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

ROX-21867: e2e tests #1661

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

parametalol
Copy link
Contributor

@parametalol parametalol commented Feb 15, 2024

Description

E2E tests for central traits.

Extracted from PR #1564.

Checklist (Definition of Done)

  • Unit and integration tests added
  • Added test description under Test manual
  • Documentation added if necessary (i.e. changes to dev setup, test execution, ...)
  • CI and all relevant tests are passing
  • Add the ticket number to the PR title if available, i.e. ROX-12345: ...
  • Discussed security and business related topics privately. Will move any security and business related topics that arise to private communication channel.
  • Add secret to app-interface Vault or Secrets Manager if necessary
  • RDS changes were e2e tested manually
  • Check AWS limits are reasonable for changes provisioning new resources

Test manual

TODO: Add manual testing efforts

# To run tests locally run:
make db/teardown db/setup db/migrate
make ocm/setup
make verify lint binary test test/integration

Copy link
Contributor

openshift-ci bot commented Feb 15, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 0x656b694d
Once this PR has been reviewed and has the lgtm label, please assign dhaus67 for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@parametalol
Copy link
Contributor Author

/retest

fmImpl "github.com/stackrox/acs-fleet-manager/pkg/client/fleetmanager/impl"
)

var _ = Describe("central traits", Ordered, func() {
Copy link
Contributor

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

Suggested change
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)
Copy link
Contributor

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)).
Copy link
Contributor

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)
Copy link
Contributor

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")
Copy link
Contributor

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")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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")

@openshift-merge-robot
Copy link
Collaborator

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.

Copy link
Contributor

openshift-ci bot commented May 28, 2024

@0x656b694d: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/images 857e30d link true /test images
ci/prow/e2e 857e30d link true /test e2e

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.

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.

3 participants