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

fix: isAuthPolicyEnforcedCondition failing in eventually #629

Merged
merged 1 commit into from
May 7, 2024

Conversation

KevFan
Copy link
Contributor

@KevFan KevFan commented May 7, 2024

Description

The test "Route and Gateway AuthPolicies exist. Gateway AuthPolicy updated to remove overrides." is flaky since isAuthPolicyEnforcedCondition previously was not a function that can be executed continuously in an Eventually block so sometimes the AuthPolicy may not be enforced by the time the condition is checked.

Since previously it was only checked once, it will always timeout even if the AuthPolicy eventually transitions to the expected status condition. Changing the function to return func() bool should fix this.

Test failing in pipeline example:

The test "Route and Gateway AuthPolicies exist. Gateway AuthPolicy updated to remove overrides." is flaky since isAuthPolicyEnforcedCondition preveiously was not a function that can be executed continuously in an Eventually block so sometimes the AuthPolicy may not be enforced by the time the condition is checked. Since previously it was only checked once, it will always timeout even if the AuthPolicy eventually transitions to the expected status condition. Changing the function to return func() bool should fix this.
@KevFan KevFan requested a review from a team as a code owner May 7, 2024 15:04
@KevFan KevFan self-assigned this May 7, 2024
@KevFan KevFan added kind/bug Something isn't working size/small labels May 7, 2024
@KevFan KevFan merged commit 3f69ffb into Kuadrant:main May 7, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working size/small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants