Skip to content

Commit 7cd95be

Browse files
use temporary download folder in test_http_header_fields_urlpat
1 parent dfb7167 commit 7cd95be

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/framework/options.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2724,6 +2724,7 @@ def test_parse_http_header_fields_urlpat(self):
27242724

27252725
def test_http_header_fields_urlpat(self):
27262726
"""Test use of --http-header-fields-urlpat."""
2727+
tmpdir = tempfile.mkdtemp()
27272728
test_ecs_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'easyconfigs', 'test_ecs')
27282729
ec_file = os.path.join(test_ecs_dir, 'g', 'gzip', 'gzip-1.6-GCC-4.9.2.eb')
27292730
common_args = [
@@ -2733,6 +2734,7 @@ def test_http_header_fields_urlpat(self):
27332734
'--force',
27342735
'--force-download',
27352736
'--logtostdout',
2737+
'--sourcepath=%s' % tmpdir,
27362738
]
27372739

27382740
# define header fields:values that should (not) show up in the logs, either
@@ -2829,6 +2831,9 @@ def run_and_assert(args, msg, words_expected=None, words_unexpected=None):
28292831
not_expected = [testdoval, testdonthdr, testdontval]
28302832
run_and_assert(args, "case E", expected, not_expected)
28312833

2834+
# cleanup downloads
2835+
shutil.rmtree(tmpdir)
2836+
28322837
def test_test_report_env_filter(self):
28332838
"""Test use of --test-report-env-filter."""
28342839

0 commit comments

Comments
 (0)