Skip to content

Commit

Permalink
Do not suffix aarch64 composes for TF
Browse files Browse the repository at this point in the history
This is no longer required from TF.
Fixes #2028
  • Loading branch information
lbarcziova committed Oct 11, 2023
1 parent 2784990 commit ddbc09b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 41 deletions.
4 changes: 0 additions & 4 deletions packit_service/worker/helpers/testing_farm.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,6 @@ def distro2compose(self, target: str) -> Optional[str]:
if compose == "CentOS-Stream":
compose = "CentOS-Stream-8"

if arch == "aarch64":
# TF has separate composes for aarch64 architecture
compose += "-aarch64"

if self.job_config.use_internal_tf:
if self.is_compose_matching(compose, compiled_composes):
return compose
Expand Down
38 changes: 1 addition & 37 deletions tests/unit/test_testing_farm.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ def test_testing_farm_response(
"target,compose,use_internal_tf",
[
("fedora-33-x86_64", "Fedora-33", False),
("fedora-33-aarch64", "Fedora-33", False),
("fedora-rawhide-x86_64", "Fedora-Rawhide", False),
("centos-stream-8-x86_64", "CentOS-Stream-8", False),
("centos-stream-x86_64", "CentOS-Stream-8", False),
Expand Down Expand Up @@ -259,43 +260,6 @@ def test_distro2compose(target, compose, use_internal_tf):
assert job_helper.distro2compose(target) == compose


@pytest.mark.parametrize(
"target,compose,use_internal_tf",
[
("fedora-33-x86_64", "Fedora-33", False),
("fedora-33-aarch64", "Fedora-33-aarch64", False),
],
)
def test_distro2compose_for_aarch64(target, compose, use_internal_tf):
job_helper = TFJobHelper(
service_config=ServiceConfig.get_service_config(),
package_config=flexmock(jobs=[]),
project=flexmock(),
metadata=flexmock(),
db_project_event=flexmock()
.should_receive("get_project_event_object")
.and_return(flexmock())
.mock(),
job_config=JobConfig(
type=JobType.tests,
trigger=JobConfigTriggerType.pull_request,
packages={
"package": CommonPackageConfig(
use_internal_tf=use_internal_tf,
)
},
),
)
job_helper = flexmock(job_helper)

response = flexmock(status_code=200, json=lambda: {"composes": [{"name": compose}]})
job_helper.should_receive("send_testing_farm_request").with_args(
endpoint="composes/public"
).and_return(response).once()

assert job_helper.distro2compose(target) == compose


@pytest.mark.parametrize(
("build_id," "chroot," "built_packages," "packages_to_send"),
[
Expand Down

0 comments on commit ddbc09b

Please sign in to comment.