From 0cabc75ff768bebb4287391b263fcefefb613f31 Mon Sep 17 00:00:00 2001 From: Lili Nie Date: Wed, 4 Dec 2024 02:53:02 -0500 Subject: [PATCH] fix: Translate job-group properly --- src/mrack/transformers/beaker.py | 2 +- tests/unit/test_beaker_transformer.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mrack/transformers/beaker.py b/src/mrack/transformers/beaker.py index 332891ad..5ef5611f 100644 --- a/src/mrack/transformers/beaker.py +++ b/src/mrack/transformers/beaker.py @@ -198,7 +198,7 @@ def create_host_requirement(self, host): "name": host["name"], "distro": distro, "os": host["os"], - "group": host["group"], + "job_group": host["group"], "meta_distro": "distro" in host, "arch": host.get("arch", "x86_64"), "variant": variant, diff --git a/tests/unit/test_beaker_transformer.py b/tests/unit/test_beaker_transformer.py index e81b3287..3c7c5264 100644 --- a/tests/unit/test_beaker_transformer.py +++ b/tests/unit/test_beaker_transformer.py @@ -196,6 +196,7 @@ async def create_transformer(self, legacy=False): "variant": "Server", "ks_meta": "FEDORA_HOST_KS_META", "job_owner": "FEDORA", + "job_group": "client", "ks_append": maximal_ksappend, "kernel_options": "FEDORA_KERNEL_OPTIONS", "kernel_options_post": "FEDORA_KERNEL_OPTIONS_POST", @@ -214,6 +215,7 @@ async def create_transformer(self, legacy=False): "distro": "Fedora-36%", "variant": "Server", "ks_meta": "FEDORA_HOST_KS_META", + "job_group": "server", "ks_append": default_ks_append, "whiteboard": default_whiteboard, "priority": default_prio, @@ -227,6 +229,7 @@ async def create_transformer(self, legacy=False): { "distro": "CentOS-Stream-9%", "variant": "BaseOS", + "job_group": "ipaserver", "ks_meta": "PROV_CONF_CENTOS_KS_META", "ks_append": ["%post\ncat /etc/redhat-release\n%end"], "whiteboard": default_whiteboard, @@ -241,6 +244,7 @@ async def create_transformer(self, legacy=False): { "distro": "CentOS-Stream-9%", "variant": "BaseOS", + "job_group": "ipaclient", "ks_meta": "PROV_CONF_CENTOS_KS_META", "ks_append": ["%post\ncat /etc/redhat-release\n%end"], "whiteboard": default_whiteboard, @@ -257,6 +261,7 @@ async def create_transformer(self, legacy=False): { "distro": "win-2022", "variant": "BaseOS", + "job_group": "ad_root", "ks_meta": "PROV_CONF_DEFAULT", "ks_append": default_ks_append, "whiteboard": "BEAKER DOES NOT SUPPORT WINDOWS THIS JOB MUST FAIL", @@ -271,6 +276,7 @@ async def create_transformer(self, legacy=False): { "distro": "RHEL-8.6%", "variant": "BaseOS", + "job_group": "ipaserver", "ks_meta": "PROV_CONF_RHEL86_KS_META", "ks_append": [ "%post\ncat /etc/redhat-release\nwget redhat.com\n%end"