Skip to content

Commit

Permalink
Let's check all versions and not only the one.
Browse files Browse the repository at this point in the history
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
  • Loading branch information
phracek committed Mar 3, 2025
1 parent 7a51f8d commit 3b00621
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/test_mysql_imagestream.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
class TestMySQLImagestreamTemplate:

def setup_method(self):
self.oc_api = OpenShiftAPI(pod_name_prefix="mysql", version=VERSION)
self.oc_api = OpenShiftAPI(pod_name_prefix="mysql", version=VERSION, shared_cluster=True)

def teardown_method(self):
self.oc_api.delete_project()
Expand Down
2 changes: 1 addition & 1 deletion test/test_mysql_imagestream_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
class TestMySQLImagestreamTemplate:

def setup_method(self):
self.oc_api = OpenShiftAPI(pod_name_prefix="mysql", version=VERSION)
self.oc_api = OpenShiftAPI(pod_name_prefix="mysql", version=VERSION, shared_cluster=True)

def teardown_method(self):
self.oc_api.delete_project()
Expand Down
2 changes: 1 addition & 1 deletion test/test_mysql_local_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
class TestMySQLDeployTemplate:

def setup_method(self):
self.oc_api = OpenShiftAPI(pod_name_prefix="mysql-testing", version=VERSION)
self.oc_api = OpenShiftAPI(pod_name_prefix="mysql-testing", version=VERSION, shared_cluster=True)
self.oc_api.import_is("imagestreams/mysql-rhel.json", "", skip_check=True)

def teardown_method(self):
Expand Down
2 changes: 1 addition & 1 deletion test/test_mysql_shared_helm_imagestreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestHelmRHELMySQLImageStreams:
def setup_method(self):
package_name = "redhat-mysql-imagestreams"
path = test_dir
self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir)
self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir, shared_cluster=True)
self.hc_api.clone_helm_chart_repo(
repo_url="https://github.com/sclorg/helm-charts", repo_name="helm-charts",
subdir="charts/redhat"
Expand Down
13 changes: 10 additions & 3 deletions test/test_mysql_shared_helm_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestHelmMySQLDBPersistent:
def setup_method(self):
package_name = "redhat-mysql-persistent"
path = test_dir
self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir)
self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir, shared_cluster=True)
self.hc_api.clone_helm_chart_repo(
repo_url="https://github.com/sclorg/helm-charts", repo_name="helm-charts",
subdir="charts/redhat"
Expand All @@ -22,12 +22,19 @@ def setup_method(self):
def teardown_method(self):
self.hc_api.delete_project()

def test_package_persistent(self):
@pytest.mark.parametrize(
"version",
[
"8.0-el8",
"8.0-el9",
],
)
def test_package_persistent(self, version):
self.hc_api.package_name = "redhat-mysql-imagestreams"
assert self.hc_api.helm_package()
assert self.hc_api.helm_installation()
self.hc_api.package_name = "redhat-mysql-persistent"
assert self.hc_api.helm_package()
assert self.hc_api.helm_installation(values={"mysql_version": "8.0-el8", "namespace": self.hc_api.namespace})
assert self.hc_api.helm_installation(values={"mysql_version": version, "namespace": self.hc_api.namespace})
assert self.hc_api.is_pod_running(pod_name_prefix="mysql")
assert self.hc_api.test_helm_chart(expected_str=["42", "testval"])

0 comments on commit 3b00621

Please sign in to comment.