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

Refactor e2e testing scripts to be more reusable and use them instead… #694

Merged
merged 3 commits into from
Jan 13, 2021

Conversation

wongma7
Copy link
Contributor

@wongma7 wongma7 commented Jan 13, 2021

Is this a bug fix or adding new feature?

What is this PR about? / Why do we need it? Although I do not like bash, it seems for this case it is the best tool for the job: run kops, helm, docker, awscli, etc. commands.

By comparison, I have found that the tester binary is harder to develop with (need to fork and build it to make changes since for example kops versions and args are hardcoded into it)

Plus, these scripts can be reused in EFS repo, I just have to figure out some subtree magic.

See also #473, I will continue that PR after this.

What testing is done?
In this repo:

TEST_PATH=./tests/e2e-migration/... \
EBS_CHECK_MIGRATION=true \
TEST_ID=18512 \
CLEAN=false \
KOPS_STATE_FILE=s3://mattwon \
AWS_REGION=us-west-2 \
AWS_AVAILABILITY_ZONES=us-west-2a \
GINKGO_FOCUS=Dynamic.\*xfs.\*should.store.data \
GINKGO_NODES=1 \
./hack/e2e/run.sh

Same scripts reusable in EFS repo:

DRIVER_NAME=aws-efs-csi-driver \
TEST_PATH=./test/e2e/... \
TEST_EXTRA_FLAGS='--cluster-name=$CLUSTER_NAME' \
TEST_ID=18512 \
CLEAN=false \
KOPS_STATE_FILE=s3://mattwon \
AWS_REGION=us-west-2 \
AWS_AVAILABILITY_ZONES=us-west-2a \
GINKGO_FOCUS=should.mount.different.paths \
GINKGO_NODES=1 \
./hack/e2e/run.sh

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 13, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wongma7

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 13, 2021
@coveralls
Copy link

coveralls commented Jan 13, 2021

Pull Request Test Coverage Report for Build 1468

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 81.177%

Totals Coverage Status
Change from base Build 1462: 0.0%
Covered Lines: 1669
Relevant Lines: 2056

💛 - Coveralls

hack/e2e/ebs.sh Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 13, 2021
@wongma7
Copy link
Contributor Author

wongma7 commented Jan 13, 2021

CI tests passed using the refactored script and output looks good

@ayberk
Copy link
Contributor

ayberk commented Jan 13, 2021

Appreciate the constant improvement!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 13, 2021
@k8s-ci-robot k8s-ci-robot merged commit 1d66536 into kubernetes-sigs:master Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants