Skip to content
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: 0 additions & 2 deletions test/run-pytest
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

THISDIR=$(dirname ${BASH_SOURCE[0]})

git show -s

PYTHON_VERSION="3.12"
if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then
PYTHON_VERSION="3.13"
Expand Down
9 changes: 4 additions & 5 deletions test/test_container_example_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ def test_run_app_test(self):
assert cid
cip = self.s2i_app.get_cip(cid_file_name=cid_file_name)
assert cip
command = PodmanCLIWrapper.podman_get_file_content(
nginx_config = PodmanCLIWrapper.podman_get_file_content(
cid_file_name=cid, filename="/opt/app-root/etc/nginx.d/default.conf"
)
# Checks if nginx configuration contains resolver
assert re.search("resolver", command)
assert re.search("resolver", nginx_config)
# Checks if nginx configuration DO NOT container "DNS_SERVER"
assert not re.search("DNS_SERVER", command)
assert not re.search("DNS_SERVER", nginx_config)
assert f"nginx/{VARS.VERSION_NO_MICRO}" in PodmanCLIWrapper.podman_run_command_and_remove(
cid_file_name=VARS.IMAGE_NAME,
cmd="nginx -v"
Expand Down Expand Up @@ -84,7 +84,7 @@ def teardown_method(self):

def test_run_app_test(self):
if VARS.VERSION.endswith("-micro"):
pytest.skip("Run the chosen tests (not for micro variant which lacks perl)")
pytest.skip("Micro image variant lacks Perl.")
cid_file_name = self.s2i_app.app_name
self.s2i_app.set_new_image(image_name=f"{VARS.IMAGE_NAME}-{cid_file_name}")
assert self.s2i_app.create_container(cid_file_name=cid_file_name, container_args="--user 10001")
Expand Down Expand Up @@ -134,7 +134,6 @@ def test_log_output(self):
url=f"http://{cip}", port=8080, page="/nothing-at-all", expected_code=404
)
logs = self.s2i_app.get_logs(cid_file_name=cid_file_name)
assert logs
# Checks logs container 'failed' and 'No such file or directory'
assert re.search("open.*failed.*No such file or directory", logs)

Expand Down
4 changes: 2 additions & 2 deletions test/test_ocp_imagestreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
class TestLatestImagestreams:

def setup_method(self):
self.isc = ImageStreamChecker(working_dir=VARS.TEST_DIR / ".." / "..")
self.isc = ImageStreamChecker(working_dir=VARS.TEST_DIR.parent.parent)

def test_latest_imagestream(self):
"""
Test checks we have the latest imagestream in GitHub repository
"""
self.latest_version = self.isc.get_latest_version()
assert self.latest_version != ""
assert self.latest_version
self.isc.check_imagestreams(self.latest_version)