Skip to content

Commit 30885ea

Browse files
committed
Add TAG to VARS so we should not imported separatelly
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
1 parent a9b2f22 commit 30885ea

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

test/conftest.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,31 @@
1010
if not check_variables():
1111
sys.exit(1)
1212

13+
TAGS = {
14+
"rhel8": "-ubi8",
15+
"rhel9": "-ubi9",
16+
"rhel10": "-ubi10",
17+
}
18+
1319
Vars = namedtuple(
1420
"Vars", [
15-
"OS", "VERSION", "IMAGE_NAME", "VERSION_NO_MICRO", "SHORT_VERSION", "TEST_DIR"
21+
"OS", "TAG", "VERSION", "IMAGE_NAME", "VERSION_NO_MICRO", "SHORT_VERSION", "TEST_DIR"
1622
]
1723
)
24+
OS = os.getenv("TARGET").lower()
1825
VERSION = os.getenv("VERSION")
1926
BRANCH_TO_TEST = "master"
2027

2128
VARS = Vars(
22-
OS=os.getenv("TARGET").lower(),
29+
OS=OS,
30+
TAG=TAGS.get(OS),
2331
VERSION=VERSION,
2432
IMAGE_NAME=os.getenv("IMAGE_NAME"),
2533
VERSION_NO_MICRO=VERSION.replace("-micro", ""),
2634
SHORT_VERSION=VERSION.replace("-micro", "").replace(".", ""),
2735
TEST_DIR=Path(__file__).parent.absolute(),
2836
)
2937

30-
TAGS = {
31-
"rhel8": "-ubi8",
32-
"rhel9": "-ubi9",
33-
"rhel10": "-ubi10",
34-
}
35-
3638

3739
def skip_clear_env_tests():
3840
if VARS.OS == "rhel8" and VERSION == "8.2":

test/test_ocp_shared_helm_template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from container_ci_suite.helm import HelmChartsAPI
22

3-
from conftest import VARS, TAGS
3+
from conftest import VARS
44

55

66
class TestHelmNginxTemplate:
@@ -30,7 +30,7 @@ def test_helm_connection(self):
3030
assert self.hc_api.helm_package()
3131
assert self.hc_api.helm_installation(
3232
values={
33-
"nginx_version": f"{VARS.VERSION_NO_MICRO}{TAGS.get(VARS.OS)}",
33+
"nginx_version": f"{VARS.VERSION_NO_MICRO}{VARS.TAG}",
3434
"namespace": self.hc_api.namespace
3535
}
3636
)

0 commit comments

Comments
 (0)