From ebc379ddd88825c3e1a3e00fb7f8a27bd08547a4 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 13 Sep 2022 14:58:15 +0200 Subject: [PATCH] Let's add support also for RHEL9 Signed-off-by: Petr "Stone" Hracek --- container_workflow_tool/distgit.py | 2 ++ tests/test_distgit.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/container_workflow_tool/distgit.py b/container_workflow_tool/distgit.py index 8243ebd..254d3dc 100644 --- a/container_workflow_tool/distgit.py +++ b/container_workflow_tool/distgit.py @@ -97,6 +97,8 @@ def _update_test_openshift_yaml(self, test_openshift_yaml, version: str = "", sh os_name = "fedora" if self.conf.image_names == "RHEL8": os_name = "rhel8" + if self.conf.image_names == "RHEL9": + os_name = "rhel9" if self.conf.image_names == "RHSCL": os_name = "rhel7" fdata = self._update_variable_in_string(fdata, tag="OS", tag_str="OS_NUMBER", variable=os_name) diff --git a/tests/test_distgit.py b/tests/test_distgit.py index 59560b8..04baaa0 100644 --- a/tests/test_distgit.py +++ b/tests/test_distgit.py @@ -123,6 +123,7 @@ def test_tag_dockerfile(self): ("VERSION", "VERSION_NUMBER", "1.14", True), ("OS", "OS_NUMBER", "rhel8", True), ("VER", "VERSION_NUMBER", "base", False), + ("OS", "OS_NUMBER", "rhel9", True), ("OS", "VERSION_NUMBER", "base", False), ("VERSION", "VERSIONS_NUMBER", "1.14", False), ("SHORT_NAME", "CONTAINER_NAME", "nodejs", True), @@ -142,6 +143,7 @@ def test_update_variable_in_string(self, tag, tag_str, variable, expected): [ ("fedora", "fedora", "base"), ("RHEL8", "rhel8", "1.14"), + ("RHEL9", "rhel9", "1.14"), ("RHSCL", "rhel7", "14"), ("FOO", "fedora", "bar") ]