-
Notifications
You must be signed in to change notification settings - Fork 13
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
ROX-21867: e2e tests #1661
base: main
Are you sure you want to change the base?
ROX-21867: e2e tests #1661
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 0x656b694d The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
fmImpl "github.com/stackrox/acs-fleet-manager/pkg/client/fleetmanager/impl" | ||
) | ||
|
||
var _ = Describe("central traits", Ordered, func() { |
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.
nit: let's align with `e2e_test.go
var _ = Describe("central traits", Ordered, func() { | |
var _ = Describe("Central traits", Ordered, func() { |
adminAPI = adminClient.AdminAPI() | ||
|
||
GinkgoWriter.Printf("Current time: %s\n", time.Now().String()) | ||
printNotes(notes) |
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.
looks like notes
are unused
Expect(err).Should(Succeed()) | ||
id := central.Id | ||
|
||
Eventually(assertCentralRequestProvisioning(ctx, client, id)). |
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.
Why does it matter to us in this test whether central will be provisioned or not?
WithPolling(defaultPolling). | ||
Should(Succeed()) | ||
|
||
defer adminAPI.DeleteDbCentralById(ctx, id) |
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.
Should we test whether it is possible to add trait to deleted central?
Expect(err).ToNot(HaveOccurred(), "no error on no traits") | ||
Expect(traits).To(BeEmpty(), "no traits yet") | ||
|
||
_, err = adminAPI.PutCentralTrait(ctx, id, "test-trait") |
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.
nit: let's rename to test-trait-0
for uniformity
|
||
traits, _, err = adminAPI.GetCentralTraits(ctx, id) | ||
Expect(err).ToNot(HaveOccurred(), "no error on having multiple traits") | ||
Expect(traits).To(BeEquivalentTo([]string{"test-trait", "test-trait-1"}), "should have only two traits") |
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.
Expect(traits).To(BeEquivalentTo([]string{"test-trait", "test-trait-1"}), "should have only two traits") | |
Expect(traits).To(BeEquivalentTo([]string{"test-trait", "test-trait-1"}), "should have exactly two traits") |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@0x656b694d: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
E2E tests for central traits.
Extracted from PR #1564.
Checklist (Definition of Done)
Test manual
ROX-12345: ...
Test manual
TODO: Add manual testing efforts