Skip to content

Commit

Permalink
backend: explicitly specify the extractall filter argument
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyX committed Aug 10, 2024
1 parent ed6d972 commit 158476b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def f_testresults(f_temp_directory):
"_resources", "testresults.tar.gz")

with tarfile.open(src_path, "r:gz") as tfile:
tfile.extractall(ctx.workdir)
tfile.extractall(ctx.workdir, filter="data")
ctx.testresults = os.path.join(ctx.workdir, 'testresults')
yield ctx

Expand Down
2 changes: 1 addition & 1 deletion backend/tests/run/test_copr_prune_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def teardown_method(self, method):
def unpack_resource(self, resource_name, target):
src_path = os.path.join(os.path.dirname(__file__), '..', '_resources', resource_name)
with tarfile.open(src_path, 'r:gz') as tar_file:
tar_file.extractall(target)
tar_file.extractall(target, filter="data")

################################ tests ################################

Expand Down
2 changes: 1 addition & 1 deletion backend/tests/test_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def unpack_resource(self, resource_name):
extract_to = self.test_project_dir

with tarfile.open(src_path, "r:gz") as tfile:
tfile.extractall(self.test_project_dir)
tfile.extractall(self.test_project_dir, filter="data")

if resource_name == "testresults.tar.gz":
# This tar.gz is inconsistently generated, but changing it would
Expand Down

0 comments on commit 158476b

Please sign in to comment.