-
Notifications
You must be signed in to change notification settings - Fork 26
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
[pre-commit][kuttl]Fix false positive asserts #430
[pre-commit][kuttl]Fix false positive asserts #430
Conversation
Here is an example that before this patch only the last TestAssert was run in the tls test:
|
now kuttl tries to run all the asserts but the first one that wasn't running before fails:
I'm not 100% sure but it feels like the pattern matching logic is incorrect in the test as there are matches for the endpoint pattern but the script consider that as an error. I need help here from @steveb or others from ironic. |
It looks like .apps is no longer part of the endpoint host name, I'll take over this PR to get it green again. Thanks |
thank you! |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/0439c7d5e31346ca9b3b97e3d4d9c7ac ✔️ noop SUCCESS in 0s |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/a818be68eb5e490ba495bf1d8ef3a158 ✔️ noop SUCCESS in 0s |
9bcebfa
to
57fdd7d
Compare
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/53f7d227c85e4dcdbc852156eb50cbde ✔️ noop SUCCESS in 0s |
/test ironic-operator-build-deploy-kuttl |
Current failure is the public ironic endpoint not returning a status code:
|
/retest |
57fdd7d
to
58c4c8e
Compare
Kuttl only runs the last TestAssert in an assert file and silently ignores the rest. So this patch combines the TestAsserts into a single one with multiple commands listed. Also to further secure against false positives `set -euxo pipefail` is added to the scripts as well.
Add a new pre-commit check to avoid using more than one TestkAssert in a single kuttl assert file as that can lead to false positives as only the last TestAssert is run by kuttl. The false positive tests fixed in a separate commit.
These tests were not running, and need fixing either due to changes in endpoint names, or incorrect regex patterns.
Public endpoint names won't resolve outside the cluster without /etc/hosts entries or integrated DNS, neither of which are occuring in the kuttl jobs. So the endpoint test needs to occur inside the cluster, which is achieved by doing an "oc run" with the official curl container image.
6fd0453
to
003e6d2
Compare
This means the -n argument is not required repeatedly for "oc get" and also "oc run" calls run in the expected namespace.
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gibizer, hjensas The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d5571e8
into
openstack-k8s-operators:main
Kuttl only runs the last TestAssert in an assert file and silently
ignores the rest. So this patch combines the TestAsserts into a single
one with multiple commands listed.
Also to further secure against false positives set -euxo pipefail is
added to the scripts as well.
Also added a new pre-commit check to avoid this in the future.