Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix helm chart tests #241

Merged
merged 2 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/test_httpd_ex_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class TestHTTPDExExampleRepo:

def setup_method(self):
self.template_name = get_service_image(IMAGE_NAME)
self.oc_api = OpenShiftAPI(pod_name_prefix=self.template_name, version=VERSION)
self.oc_api = OpenShiftAPI(pod_name_prefix=self.template_name, version=VERSION, shared_cluster=True)

def teardown_method(self):
self.oc_api.delete_project()
Expand Down
4 changes: 2 additions & 2 deletions test/test_httpd_shared_helm_imagestreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
class TestHelmRHELHttpdImageStreams:

def setup_method(self):
package_name = "httpd-imagestreams"
package_name = "redhat-httpd-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
16 changes: 8 additions & 8 deletions test/test_httpd_shared_helm_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class TestHelmHTTPDTemplate:

def setup_method(self):
package_name = "httpd-template"
package_name = "redhat-httpd-template"
path = test_dir
self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir)
self.hc_api.clone_helm_chart_repo(
Expand All @@ -40,10 +40,10 @@ def test_package_persistent_by_curl(self):
new_version = VERSION
if "micro" in VERSION:
new_version = VERSION.replace("-micro", "")
self.hc_api.package_name = "httpd-imagestreams"
self.hc_api.package_name = "redhat-httpd-imagestreams"
assert self.hc_api.helm_package()
assert self.hc_api.helm_installation()
self.hc_api.package_name = "httpd-template"
self.hc_api.package_name = "redhat-httpd-template"
assert self.hc_api.helm_package()
assert self.hc_api.helm_installation(
values={
Expand All @@ -52,19 +52,19 @@ def test_package_persistent_by_curl(self):
}
)
assert self.hc_api.is_s2i_pod_running(pod_name_prefix="httpd-example")
assert self.hc_api.test_helm_curl_output(
route_name="httpd-example",
expected_str="Welcome to your static httpd application on OpenShift"
assert self.hc_api.oc_api.check_response_inside_cluster(
name_in_template="httpd-example",
expected_output="Welcome to your static httpd application on OpenShift"
)

def test_package_persistent_by_helm_chart_test(self):
new_version = VERSION
if "micro" in VERSION:
new_version = VERSION.replace("-micro", "")
self.hc_api.package_name = "httpd-imagestreams"
self.hc_api.package_name = "redhat-httpd-imagestreams"
self.hc_api.helm_package()
assert self.hc_api.helm_installation()
self.hc_api.package_name = "httpd-template"
self.hc_api.package_name = "redhat-httpd-template"
self.hc_api.helm_package()
assert self.hc_api.helm_installation(
values={
Expand Down