Skip to content

Commit 20ce4a2

Browse files
committed
Fix issues that were suggested in pull request
#346 Signed-off-by: Petr "Stone" Hracek <[email protected]>
1 parent 30885ea commit 20ce4a2

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

test/run-pytest

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

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

11-
git show -s
12-
1311
PYTHON_VERSION="3.12"
1412
if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then
1513
PYTHON_VERSION="3.13"

test/test_container_example_apps.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ def test_run_app_test(self):
5050
assert cid
5151
cip = self.s2i_app.get_cip(cid_file_name=cid_file_name)
5252
assert cip
53-
command = PodmanCLIWrapper.podman_get_file_content(
53+
nginx_config = PodmanCLIWrapper.podman_get_file_content(
5454
cid_file_name=cid, filename="/opt/app-root/etc/nginx.d/default.conf"
5555
)
5656
# Checks if nginx configuration contains resolver
57-
assert re.search("resolver", command)
57+
assert re.search("resolver", nginx_config)
5858
# Checks if nginx configuration DO NOT container "DNS_SERVER"
59-
assert not re.search("DNS_SERVER", command)
59+
assert not re.search("DNS_SERVER", nginx_config)
6060
assert f"nginx/{VARS.VERSION_NO_MICRO}" in PodmanCLIWrapper.podman_run_command_and_remove(
6161
cid_file_name=VARS.IMAGE_NAME,
6262
cmd="nginx -v"
@@ -84,7 +84,7 @@ def teardown_method(self):
8484

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

test/test_ocp_imagestreams.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
class TestLatestImagestreams:
77

88
def setup_method(self):
9-
self.isc = ImageStreamChecker(working_dir=VARS.TEST_DIR / ".." / "..")
9+
self.isc = ImageStreamChecker(working_dir=VARS.TEST_DIR.parent.parent)
1010

1111
def test_latest_imagestream(self):
1212
"""
1313
Test checks we have the latest imagestream in GitHub repository
1414
"""
1515
self.latest_version = self.isc.get_latest_version()
16-
assert self.latest_version != ""
16+
assert self.latest_version
1717
self.isc.check_imagestreams(self.latest_version)

0 commit comments

Comments
 (0)