8000 Integration test overhaul by shreyas-s-rao · Pull Request #225 · gardener/etcd-backup-restore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Integration test overhaul #225

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

Merged
merged 2 commits into from
Jul 22, 2020

Conversation

shreyas-s-rao
Copy link
Collaborator
@shreyas-s-rao shreyas-s-rao commented May 29, 2020

What this PR does / why we need it:
This PR adds support to run integration tests on any given k8s cluster. Introduces the make integration-test-cluster target, which can be used to run etcd-backup-restore integration tests by setting environment variables INTEGRATION_TEST_KUBECONFIG (cluster against which tests will be run), ETCD_VERSION (optional) and ETCDBR_VERSION (optional), and S3 bucket details via environment variables STORAGE_CONTAINER, ACCESS_KEY_ID, SECRET_ACCESS_KEY and REGION.

Which issue(s) this PR fixes:
Fixes partially #107

Special notes for your reviewer:
Will raise a separate PR for TM integration.

Release note:

Integration tests can be executed on any given Kubernetes cluster using the `make integration-test-cluster` target against the cluster pointed to by the environment variable `INTEGRATION_TEST_KUBECONFIG`.

@shreyas-s-rao shreyas-s-rao added the reviewed/do-not-merge Has no approval for merging as it may break things, be of poor quality or have (ext.) dependencies label May 29, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 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 May 29, 2020
@shreyas-s-rao shreyas-s-rao marked this pull request as draft May 29, 2020 05:42
@shreyas-s-rao shreyas-s-rao force-pushed the integration-test-overhaul branch from 62be5c7 to 2a5843b Compare May 29, 2020 13:25
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 29, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 29, 2020
@shreyas-s-rao shreyas-s-rao changed the title [WIP] Integration test overhaul Integration test overhaul May 29, 2020
@shreyas-s-rao shreyas-s-rao force-pushed the integration-test-overhaul branch from 2a5843b to 72930a8 Compare May 29, 2020 13:52
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 29, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 29, 2020
@shreyas-s-rao shreyas-s-rao force-pushed the integration-test-overhaul branch from 72930a8 to 019fd39 Compare May 29, 2020 14:32
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 29, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 29, 2020
@shreyas-s-rao shreyas-s-rao marked this pull request as ready for review May 29, 2020 14:37
@shreyas-s-rao shreyas-s-rao added component/etcd-backup-restore ETCD Backup & Restore kind/test Test needs/lgtm Needs approval for merging needs/review Needs review area/quality Output qualification (tests, checks, scans, automation in general, etc.) related 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/do-not-merge Has no approval for merging as it may break things, be of poor quality or have (ext.) dependencies labels May 29, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 29, 2020
@shreyas-s-rao shreyas-s-rao force-pushed the integration-test-overhaul branch from 019fd39 to 672551f Compare June 3, 2020 08:20
@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 Jun 3, 2020
Copy link
Contributor
@swapnilgm swapnilgm left a comment

Choose a reason for hiding this comment

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

/lgtm.
Thanks for the PR. Nice work with keeping flexibility with environment varaible setup. Sorry for the delay in review. So only TM definition is required now. Which as discussed will be done later.

@swapnilgm
Copy link
Contributor

Please rebase the PR.

Signed-off-by: Shreyas Rao <shreyas.sriganesh.rao@sap.com>
@shreyas-s-rao shreyas-s-rao force-pushed the integration-test-overhaul branch from 672551f to 769cdd4 Compare July 19, 2020 20:58
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 19, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 19, 2020
@shreyas-s-rao
Copy link
Collaborator Author

@swapnilgm PR is rebased.

@shreyas-s-rao shreyas-s-rao force-pushed the integration-test-overhaul branch from 769cdd4 to 11e1f50 Compare July 19, 2020 21:16
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 19, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 19, 2020
@shreyas-s-rao shreyas-s-rao force-pushed the integration-test-overhaul branch from 11e1f50 to b694732 Compare July 19, 2020 21:30
@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 Jul 19, 2020
cleanup_test_environment
echo "Successfully completed all tests."
if [ -r "$INTEGRATION_TEST_KUBECONFIG" ]; then
SOURCE_PATH=$SOURCE_PATH ETCD_VERSION=$ETCD_VERSION ETCDBR_VERSION=$ETCDBR_VERSION KUBECONFIG=$INTEGRATION_TEST_KUBECONFIG STORAGE_CONTAINER=$TEST_ID ACCESS_KEY_ID=$ACCESS_KEY_ID SECRET_ACCESS_KEY=$SECRET_ACCESS_KEY REGION=$REGION ginkgo -v -timeout=15m -mod=vendor test/e2e/integrationcluster
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
SOURCE_PATH=$SOURCE_PATH ETCD_VERSION=$ETCD_VERSION ETCDBR_VERSION=$ETCDBR_VERSION KUBECONFIG=$INTEGRATION_TEST_KUBECONFIG STORAGE_CONTAINER=$TEST_ID ACCESS_KEY_ID=$ACCESS_KEY_ID SECRET_ACCESS_KEY=$SECRET_ACCESS_KEY REGION=$REGION ginkgo -v -timeout=15m -mod=vendor test/e2e/integrationcluster
KUBECONFIG=$INTEGRATION_TEST_KUBECONFIG STORAGE_CONTAINER=$TEST_ID ginkgo -v -timeout=15m -mod=vendor test/e2e/integrationcluster

Signed-off-by: Shreyas Rao <shreyas.sriganesh.rao@sap.com>
@shreyas-s-rao shreyas-s-rao force-pushed the integration-test-overhaul branch from b694732 to ac47019 Compare July 20, 2020 10:07
@gardener-robot-ci-3 gardener-robot-ci-3 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 Jul 20, 2020
@swapnilgm swapnilgm merged commit 8f74efd into gardener:master Jul 22, 2020
@shreyas-s-rao shreyas-s-rao deleted the integration-test-overhaul branch July 23, 2020 08:54
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 component/etcd-backup-restore ETCD Backup & Restore kind/test Test needs/lgtm Needs approval for merging needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/review Needs review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0