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

Add support for Local provider for e2e tests #668

Merged

Conversation

shreyas-s-rao
Copy link
Contributor

How to categorize this PR?

/area testing quality
/kind test

What this PR does / why we need it:
Add support for Local provider for e2e tests, along with other minor fixes/cleanups.

Which issue(s) this PR fixes:
Fixes #667

Special notes for your reviewer:

  1. Local provider backup buckets are created by mounting /etc hostPath onto the infra job in order to create ./gardener/local-backupbuckets/<container-name> directory and to delete it once the tests are completed. Skaffold + kustomize is used for this, similar to infra jobs of other providers like aws, azure and gcp.
  2. Purging of snapshots at the beginning of each test spec was not working (v1 snapshots were being purged instead of v2 snapshots), due to which some tests were flaky, especially creation of 3-node etcd cluster, since backups possibly already existing in the bucket from a previous test spec. This has now been fixed, as well as enhanced for Local provider via a purge-local-snapstore job that runs before each test spec when using Local provider.
  3. Occurrences of etcd-main in many tests have been replaced by etcd-test.
  4. Repeated import of k8s.io/api/core/v1 package as corev1 and v1 in test/e2e/utils.go has been rectified.
  5. PHONY for deploy-via-kustomize in Makefile has been fixed.
  6. Update doc to include Local provider for e2e tests; minor edits in docs too.

This PR can be tested by running:

make kind-up
make PROVIDERS="local" TEST_ID="e2e-test" STEPS="setup,deploy,test,undeploy,cleanup" test-e2e
make USE_ETCD_DRUID_FEATURE_GATES=true PROVIDERS="local" TEST_ID="e2e-test-2" STEPS="setup,deploy,test,undeploy,cleanup" test-e2e
make kind-down

Release note:

Add support for `Local` provider for e2e tests.

@shreyas-s-rao shreyas-s-rao added this to the v0.20.0 milestone Aug 12, 2023
@shreyas-s-rao shreyas-s-rao requested a review from a team as a code owner August 12, 2023 21:20
@gardener-robot gardener-robot added area/quality Output qualification (tests, checks, scans, automation in general, etc.) related area/testing Testing related kind/test Test needs/review Needs review size/l Size of pull request is large (see gardener-robot robot/bots/size.py) needs/second-opinion Needs second review by someone else labels Aug 12, 2023
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Aug 12, 2023
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Aug 14, 2023
Copy link
Contributor

@seshachalam-yv seshachalam-yv left a comment

Choose a reason for hiding this comment

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

Overall looks good to me
Thanks @shreyas-s-rao for adding local provider support to E2E test
/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review needs/second-opinion Needs second review by someone else labels Aug 14, 2023
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Aug 14, 2023
Copy link
Contributor

@aaronfern aaronfern left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @shreyas-s-rao!
Looks good, just one question, otherwise /lgtm

test/e2e/utils.go Show resolved Hide resolved
Copy link
Contributor

@aaronfern aaronfern left a comment

Choose a reason for hiding this comment

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

/lgtm

@shreyas-s-rao shreyas-s-rao merged commit 9a598d0 into gardener:master Aug 17, 2023
1 check passed
@shreyas-s-rao shreyas-s-rao deleted the enh/e2e-test-local-provider branch August 17, 2023 03:46
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Aug 17, 2023
@shreyas-s-rao shreyas-s-rao self-assigned this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quality Output qualification (tests, checks, scans, automation in general, etc.) related area/testing Testing related kind/test Test needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging size/l Size of pull request is large (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Support Local provider for e2e tests
5 participants