Skip to content

Commit 192f781

Browse files
committed
Do not tests imagestreams on RHEL10 yet.
They do not exist. Signed-off-by: Petr "Stone" Hracek <[email protected]>
1 parent c896ed7 commit 192f781

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

test/test-lib-php.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ function test_php_integration() {
2020

2121
# Check the imagestream
2222
function test_php_imagestream() {
23-
23+
if [ "$OS" == "rhel10" ]; then
24+
echo "Imagestreams are not released yet for RHEL10. Let's skip this test."
25+
return
26+
fi
2427
ct_os_test_image_stream_s2i "${THISDIR}/imagestreams/php-${OS%[0-9]*}.json" "${IMAGE_NAME}" \
2528
"https://github.com/sclorg/s2i-php-container.git" \
2629
test/test-app \
@@ -31,6 +34,10 @@ function test_php_imagestream() {
3134
function test_php_template() {
3235
local supported_use_case
3336
local check_msg
37+
if [ "$OS" == "rhel10" ]; then
38+
echo "Imagestreams are not released yet for RHEL10. Let's skip this test."
39+
return
40+
fi
3441
if [ "${VERSION}" == "7.4" ] || [ "${VERSION}" == "8.0" ]; then
3542
supported_use_case="True"
3643
BRANCH_TO_TEST="4.X"

test/test_php_deploy_templates.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
class TestDeployTemplate:
3939

4040
def setup_method(self):
41-
self.oc_api = OpenShiftAPI(pod_name_prefix="php-testing", version=VERSION, shared_cluster=True)
41+
self.oc_api = OpenShiftAPI(pod_name_prefix="php-testing", version=VERSION)
4242
self.oc_api.import_is("imagestreams/php-rhel.json", "", skip_check=True)
4343
#assert self.oc_api.upload_image(DEPLOYED_MYSQL_IMAGE, IMAGE_SHORT)
4444

@@ -52,7 +52,8 @@ def teardown_method(self):
5252
]
5353
)
5454
def test_php_template_inside_cluster(self, template):
55-
55+
if OS == "rhel10":
56+
pytest.skip("Do NOT test on RHEL10 yet.")
5657
service_name = "php-testing"
5758
template_url = self.oc_api.get_raw_url_for_json(
5859
container="cakephp-ex", dir="openshift/templates", filename=template, branch=branch_to_test
@@ -74,7 +75,7 @@ def test_php_template_inside_cluster(self, template):
7475
name_in_template="php",
7576
openshift_args=openshift_args
7677
)
77-
assert self.oc_api.template_deployed(name_in_template=service_name)
78+
assert self.oc_api.is_template_deployed(name_in_template=service_name)
7879
assert self.oc_api.check_response_inside_cluster(
7980
name_in_template=service_name, expected_output=check_msg
8081
)

test/test_php_s2i_imagestreams.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
import pytest
34

45
from container_ci_suite.openshift import OpenShiftAPI
56
from container_ci_suite.utils import check_variables
@@ -26,14 +27,17 @@ def teardown_method(self):
2627
self.oc_api.delete_project()
2728

2829
def test_php_template_inside_cluster(self):
30+
if OS == "rhel10":
31+
pytest.skip("Do NOT test on RHEL10 yet.")
2932
service_name = f"php-{SHORT_VERSION}-testing"
3033
assert self.oc_api.deploy_imagestream_s2i(
3134
imagestream_file="imagestreams/php-rhel.json",
3235
image_name=IMAGE_NAME,
3336
app="https://github.com/sclorg/s2i-php-container.git",
34-
context="test/test-app"
37+
context="test/test-app",
38+
service_name=service_name
3539
)
36-
assert self.oc_api.template_deployed(name_in_template=service_name)
40+
assert self.oc_api.is_template_deployed(name_in_template=service_name)
3741
assert self.oc_api.check_response_inside_cluster(
3842
name_in_template=service_name, expected_output="Test PHP passed"
3943
)

test/test_php_s2i_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_php_template_inside_cluster(self):
3030
context="test/test-app",
3131
service_name=service_name
3232
)
33-
assert self.oc_api.template_deployed(name_in_template=service_name)
33+
assert self.oc_api.is_template_deployed(name_in_template=service_name)
3434
assert self.oc_api.check_response_inside_cluster(
3535
name_in_template=service_name, expected_output="Test PHP passed"
3636
)

0 commit comments

Comments
 (0)