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: do not FailNow() when helm upgrade test's assertion fails #352

Merged
merged 3 commits into from
Jun 19, 2024

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Jun 19, 2024

What this PR does / why we need it:

This fixes an issue where the eventual assertion, fails on the first failure.

E.g. https://github.com/Kong/gateway-operator/actions/runs/9584187717/job/26427207540

make: *** [Makefile:363: test.e2e] Error 2
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas
    test_helm_install_upgrade.go:329: Deployment bf33e924-67d0-4001-8827-3e07ace08abb/kgo-1-2-3-to-e2e-771d-gateway-operator-controller-manager has no AvailableReplicas

=== FAIL: test/e2e TestE2E/TestHelmUpgrade/upgrade_from_1.2.3_to_current/DataPlane_deployment_is_not_patched_after_operator_upgrade (unknown)
panic: Assertion failed

goroutine 650 [running]:
github.com/stretchr/testify/assert.(*CollectT).FailNow(0xc003158[390](https://github.com/Kong/gateway-operator/actions/runs/9584187717/job/26427207540#step:6:391)?)
	/home/runner/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1924 +0x2b
github.com/kong/gateway-operator/test/e2e.TestHelmUpgrade.func4.gatewayDataPlaneDeploymentIsNotPatched.1({0x6e59b78, 0xc000cf5b80}, 0xc003158390, {0x6e6b520, 0xc002ce5050})
	/home/runner/work/gateway-operator/gateway-operator/test/e2e/test_helm_install_upgrade.go:458 +0x399
github.com/kong/gateway-operator/test/e2e.TestHelmUpgrade.func4(0xc003158390, 0xc0013d8ea0)
	/home/runner/work/gateway-operator/gateway-operator/test/e2e/test_helm_install_upgrade.go:178 +0xbb
github.com/kong/gateway-operator/test/e2e.TestHelmUpgrade.func8.3.1(0xc003158390)
	/home/runner/work/gateway-operator/gateway-operator/test/e2e/test_helm_install_upgrade.go:337 +0x43
github.com/stretchr/testify/assert.EventuallyWithT.func1()
	/home/runner/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1983 +0xb8
created by github.com/stretchr/testify/assert.EventuallyWithT in goroutine 649
	/home/runner/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1978 +0x42b

@pmalek pmalek added this to the KGO v1.3.x milestone Jun 19, 2024
@pmalek pmalek marked this pull request as ready for review June 19, 2024 16:11
@pmalek pmalek requested a review from a team as a code owner June 19, 2024 16:11
@pmalek pmalek self-assigned this Jun 19, 2024
Copy link
Member

@programmer04 programmer04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏅

@pmalek pmalek enabled auto-merge (squash) June 19, 2024 16:30
@pmalek pmalek merged commit 0781df2 into main Jun 19, 2024
20 checks passed
@pmalek pmalek deleted the do-not-failnow-when-assertion-fails-in-e2e-upgrade-test branch June 19, 2024 16:41
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.

2 participants