-
Notifications
You must be signed in to change notification settings - Fork 73
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
Reinstate webhook tests #1072
Merged
rajivnathan
merged 1 commit into
codeready-toolchain:master
from
rajivnathan:reinstateWebhokTests
Nov 26, 2024
Merged
Reinstate webhook tests #1072
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ import ( | |
"context" | ||
"encoding/json" | ||
"fmt" | ||
"os" | ||
"reflect" | ||
"sort" | ||
"strings" | ||
|
@@ -2296,11 +2295,6 @@ func (a *MemberAwaitility) verifySecret(t *testing.T) []byte { | |
} | ||
|
||
func (a *MemberAwaitility) verifyMutatingWebhookConfig(t *testing.T, ca []byte) { | ||
if val := os.Getenv("skip-webhook-checks-on-setup"); val == "true" { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we can keep these checks for the future use and just remove the |
||
// skipped temporarily only for setup migration test but applies for after migration test | ||
// This should be removed after PR https://github.com/codeready-toolchain/toolchain-e2e/pull/1070 is merged | ||
return | ||
} | ||
t.Logf("checking MutatingWebhookConfiguration") | ||
actualMutWbhConf := &admv1.MutatingWebhookConfiguration{} | ||
a.waitForResource(t, "", "member-operator-webhook-"+a.Namespace, actualMutWbhConf) | ||
|
@@ -2380,11 +2374,6 @@ func (a *MemberAwaitility) verifyMutatingWebhookConfig(t *testing.T, ca []byte) | |
} | ||
|
||
func (a *MemberAwaitility) verifyValidatingWebhookConfig(t *testing.T, ca []byte) { | ||
if val := os.Getenv("skip-webhook-checks-on-setup"); val == "true" { | ||
// skipped temporarily only for setup migration test but applies for after migration test | ||
// This should be removed after PR https://github.com/codeready-toolchain/toolchain-e2e/pull/1070 is merged | ||
return | ||
} | ||
t.Logf("checking ValidatingWebhookConfiguration '%s'", "member-operator-validating-webhook"+a.Namespace) | ||
actualValWbhConf := &admv1.ValidatingWebhookConfiguration{} | ||
a.waitForResource(t, "", "member-operator-validating-webhook-"+a.Namespace, actualValWbhConf) | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in addition to Alexey's comment maybe we could keep this commented so that we can just uncomment when needed. WDYT? Of course adjusting a bit the description above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, but why did we actually need this configuration option at the first place?
There was a split of the init wait logic to two functions:
where the first one only waits until the operators are deployed, so we don't need to deal with these chicken-egg problems.
As I see it, the original PR should have worked without having this configuration hack & environment set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The webhook test was failing so I thought it was due to the migration thing. I forgot that we made the change to the wait logic. I guess there was something actually wrong with the webhook tests then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I checked the failure in the other PR and it wasn't related to setup migration test suite.
Anyway, let's drop this and keep an eye on any flakiness/failures related to migration.