Skip to content
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

tests(envtest): fix Konnect envtests sdk assertions #807

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Oct 25, 2024

What this PR does / why we need it:

This PR fixes an issue with some envtest based tests for Konnect entities where SDK assertions were done first and checking if the entity was indeed programmed was done after.

This causes the SDK assertions to sometimes fail (as the underlying code may not have managed to fulfil all the asserts yet).

https://github.com/Kong/gateway-operator/actions/runs/11520317393/job/32072355048?pr=806#step:5:345

    konnect_entities_kongtarget_test.go:90: FAIL:	CreateTargetWithUpstream(string,mock.argumentMatcher)
        		at: [/home/runner/work/gateway-operator/gateway-operator/controller/konnect/ops/sdk/mocks/zz_generated.kongtarget_mock.go:72 /home/runner/work/gateway-operator/gateway-operator/test/envtest/konnect_entities_kongtarget_test.go:69]
    konnect_entities_kongtarget_test.go:90: FAIL: 0 out of 1 expectation(s) were met.
        	The code you are testing needs to make 1 more call(s).
        	at: [/home/runner/work/gateway-operator/gateway-operator/test/envtest/konnect_entities_kongtarget_test.go:90 /home/runner/go/pkg/mod/golang.org/[email protected]/src/runtime/asm_amd64.s:1700]

@pmalek pmalek added this to the KGO v1.4.x milestone Oct 25, 2024
@pmalek pmalek self-assigned this Oct 25, 2024
@pmalek pmalek requested a review from a team as a code owner October 25, 2024 15:46
@pmalek pmalek enabled auto-merge (squash) October 25, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant