openstack-k8s-operators / openstack-operator

Meta Operator for OpenStack
https://openstack-k8s-operators.github.io/openstack-operator/
Apache License 2.0
27 stars 76 forks source link

[envtest]Stabilize version controller tests #836

Closed gibizer closed 3 months ago

gibizer commented 3 months ago

There was a race condition between the version controller applying the finalizer to the version instance and the test case cleanup removing such finalizer. By waiting for the controller to run at least once before the test finishes is enough to avoid the race as the controller only adds the finalizer during the first reconcile run that initialize the conditions.

Also cleaned up the test case itself a bit and added more precise assert.

Co-authored-by: Dan Prince dprince@redhat.com

openshift-ci[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprince, gibizer

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: - ~~[OWNERS](https://github.com/openstack-k8s-operators/openstack-operator/blob/main/OWNERS)~~ [dprince] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 3 months ago

@gibizer: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/openstack-operator-build-deploy-kuttl 9eb1131555a37bc7dc367e88d8704736b3ad33fb link unknown /test openstack-operator-build-deploy-kuttl

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
gibizer commented 3 months ago

/test openstack-operator-build-deploy-kuttl From the logs I see that all the kuttl tests are actually passed so something failed in cleanup