-
Notifications
You must be signed in to change notification settings - Fork 138
Bug 1771809: Add e2e for PodDisruptionBudgetAtLimit alert #316
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
Bug 1771809: Add e2e for PodDisruptionBudgetAtLimit alert #316
Conversation
d1a5a81 to
d66b663
Compare
|
/test e2e-aws-operator |
test/e2e/operator_test.go
Outdated
| }) | ||
|
|
||
| // test that pdb-atlimit alert exists when there is a pdb at limit | ||
| t.Run("PodDisruptionBudgetAtLimit alert", func(t *testing.T) { |
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.
(No action required) Consider using of dashes or underscores in test names instead of spaces to simplify targeting test execution.
89cd4aa to
bd2beb9
Compare
|
@marun @sanchezl thanks for the review! I've addressed your suggestions, then moved the query functions to library-go openshift/library-go#602 I've placed a fake-bump commit to test the library-go pr. |
bd2beb9 to
3a5b5a1
Compare
3a5b5a1 to
60d72f1
Compare
bd86675 to
9f908dd
Compare
9f908dd to
138a15f
Compare
|
/retest |
|
/test e2e-aws |
soltysh
left a comment
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.
A few nits, mostly
/approve
Makefile
Outdated
| $(call add-bindata,v4.1.0,./bindata/v4.1.0/...,bindata,v411_00_assets,pkg/operator/v411_00_assets/bindata.go) | ||
|
|
||
| test-e2e: GO_TEST_PACKAGES :=./test/e2e/... | ||
| test-e2e: GO_TEST_FLAGS += -v |
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.
Ditto as in the other PR, I don't think we need it here.
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 prefer to see what's going on rather than a hang, but I removed this change : )
test/e2e/operator_test.go
Outdated
| // Wait for pbd | ||
| err = wait.PollImmediate(time.Second*1, testTimeout, func() (bool, error) { | ||
| if _, err := policyClient.PodDisruptionBudgets(name).List(metav1.ListOptions{LabelSelector: "app=pbtest"}); err != nil { | ||
| return false, fmt.Errorf("Waiting for poddisruptionbudget") |
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.
Now with go1.13:
fmt.Errorf("waiting for poddisruptionbudget: %w", err)
| if err != nil { | ||
| return false, err | ||
| } | ||
| if len(pods.Items) > 0 && pods.Items[0].Status.Phase == corev1.PodRunning { |
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.
This still holds.
test/e2e/operator_test.go
Outdated
| }, | ||
| } | ||
| _, err := client.CoreV1().Pods(name).Create(pod) | ||
| if err != nil { |
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.
Just return err
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.
done
|
/hold cancel |
138a15f to
bc3fa49
Compare
|
/retest |
3 similar comments
|
/retest |
|
/retest |
|
/retest |
bc3fa49 to
3b3a25c
Compare
|
/retest |
soltysh
left a comment
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.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sallyom, soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest Please review the full test history for this PR and help us cut down flakes. |
Here's an e2e that:
/cc @soltysh @marun