From 81e1815939ba72738fae9376936d4f992831e8af Mon Sep 17 00:00:00 2001 From: Jakub Kadlcik Date: Mon, 24 Jul 2023 01:03:51 +0200 Subject: [PATCH] backend: update tests to work with new test-data tarball https://github.com/fedora-copr/test-data-copr-backend/pull/1 --- backend/copr-backend.spec | 2 +- backend/tests/conftest.py | 4 ++-- backend/tests/testlib/__init__.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/copr-backend.spec b/backend/copr-backend.spec index 8f3bdbe34..c7641fee3 100644 --- a/backend/copr-backend.spec +++ b/backend/copr-backend.spec @@ -3,7 +3,7 @@ %endif %global prunerepo_version 1.20 -%global tests_version 2 +%global tests_version 3 %global tests_tar test-data-copr-backend %global copr_common_version 0.16.4.dev diff --git a/backend/tests/conftest.py b/backend/tests/conftest.py index f44bc4105..a3b76f323 100644 --- a/backend/tests/conftest.py +++ b/backend/tests/conftest.py @@ -119,8 +119,8 @@ def f_third_build(f_second_build): Same as ``f_second_build``, but one more build. """ ctx = f_second_build - source = os.path.join(os.environ["TEST_DATA_DIRECTORY"], - "build_results", "00848963-example", + source = os.path.join(os.environ["TEST_DATA_DIRECTORY"], "build_results", + "fedora-30-x86_64", "00848963-example", "example-1.0.14-1.fc30.x86_64.rpm") build = '00000003-example' ctx.builds.append(build) diff --git a/backend/tests/testlib/__init__.py b/backend/tests/testlib/__init__.py index 72a819ffd..781a78a8a 100644 --- a/backend/tests/testlib/__init__.py +++ b/backend/tests/testlib/__init__.py @@ -177,7 +177,8 @@ def _full_source_path(self, src): def rsync_download(self, src, dest, logfile=None, max_retries=0): data = os.environ["TEST_DATA_DIRECTORY"] trail_slash = src.endswith("/") - src = os.path.join(data, "build_results", "00848963-example") + src = os.path.join(data, "build_results", "fedora-30-x86_64", + "00848963-example") if trail_slash: src = src + "/"