Conversation
6d1b8be to
a9b364b
Compare
|
[test-pytest] |
Pull Request validationFailed🔴 Failed or pending statuses:
🔴 Review - Missing review from a member (1 required) |
Testing Farm results
|
|
[test-pytest] |
2c5be0a to
3527c29
Compare
|
Let's test it again after fixing VERSION and micro [test-pytest] |
|
/auto-merge |
|
[test-pytest] |
07a1127 to
8b2045c
Compare
|
|
[test-pytest] |
32327e8 to
005d295
Compare
|
After removing some leftovers, let's test it again. |
|
[test-pytest] |
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
All PyTest have naming `test_container_*.py` Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
005d295 to
1223c90
Compare
|
The suite were completelly rewritten based on s2i-python-container improvements sclorg/s2i-python-container#759 [test-pytest][test-openshift] |
Fix pre-commit issues Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
|
@frenzymadness The tests have been rewritten based on your small improvements in s2i-python-container. All was also checked by So PTAL. Not urgent. |
|
[test-pytest][test-openshift] |
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
|
[test-pytest][test-openshift] |
frenzymadness
left a comment
There was a problem hiding this comment.
It's good overall. I found just a few possible improvements.
|
|
||
| THISDIR=$(dirname ${BASH_SOURCE[0]}) | ||
|
|
||
| git show -s |
There was a problem hiding this comment.
I'm not sure what this is good for. The information about the last commit is usually available in the CI, and you typically don't need it in the output.
| command = 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) | ||
| # Checks if nginx configuration DO NOT container "DNS_SERVER" | ||
| assert not re.search("DNS_SERVER", command) |
There was a problem hiding this comment.
command is not a very good descriptive name for this variable.
| command = 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) | |
| # Checks if nginx configuration DO NOT container "DNS_SERVER" | |
| assert not re.search("DNS_SERVER", command) | |
| 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", nginx_config) | |
| # Checks if nginx configuration DO NOT container "DNS_SERVER" | |
| assert not re.search("DNS_SERVER", nginx_config) |
|
|
||
| def test_run_app_test(self): | ||
| if VARS.VERSION.endswith("-micro"): | ||
| pytest.skip("Run the chosen tests (not for micro variant which lacks perl)") |
There was a problem hiding this comment.
| pytest.skip("Run the chosen tests (not for micro variant which lacks perl)") | |
| pytest.skip("Micro image variant lacks Perl.") |
| 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 |
There was a problem hiding this comment.
This is kinda duplicate. If logs is empty, the next assert fails because it won't find anything in an empty string.
| class TestLatestImagestreams: | ||
|
|
||
| def setup_method(self): | ||
| self.isc = ImageStreamChecker(working_dir=VARS.TEST_DIR / ".." / "..") |
There was a problem hiding this comment.
| self.isc = ImageStreamChecker(working_dir=VARS.TEST_DIR / ".." / "..") | |
| self.isc = ImageStreamChecker(working_dir=VARS.TEST_DIR.parent.parent) |
| Test checks we have the latest imagestream in GitHub repository | ||
| """ | ||
| self.latest_version = self.isc.get_latest_version() | ||
| assert self.latest_version != "" |
There was a problem hiding this comment.
| assert self.latest_version != "" | |
| assert self.latest_version |
#346 Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
#346 Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
#346 Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
This pull request contains set of PyTest from migration bash tests to PyTest.
The migration matrix is:
Also OpenShift Pytest were renamed to test_ocp_*.py