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 e2e test for volume resizing #705

Merged

Conversation

AndyXiangLi
Copy link
Contributor

Is this a bug fix or adding new feature?
Fixes #316
What is this PR about? / Why do we need it?
Add e2e test for volume resizing

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

Hi @AndyXiangLi. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 25, 2021
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 25, 2021
@ayberk
Copy link
Contributor

ayberk commented Jan 25, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 25, 2021
@AndyXiangLi AndyXiangLi force-pushed the e2e-test-volume-resize branch from 516e850 to 15aec3c Compare January 25, 2021 19:05
@coveralls
Copy link

coveralls commented Jan 25, 2021

Pull Request Test Coverage Report for Build 1509

  • 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.196%

Totals Coverage Status
Change from base Build 1507: 0.0%
Covered Lines: 1697
Relevant Lines: 2090

💛 - Coveralls

updatedSize := updatedPvc.Spec.Resources.Requests["storage"]

By("Wait for resize to complete")
time.Sleep(30 * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

How did you come up with this number? Can we do this incrementally? Check every 5 seconds and give up after 1 minute for example.

Copy link
Contributor Author

@AndyXiangLi AndyXiangLi Jan 27, 2021

Choose a reason for hiding this comment

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

Yeah from my observation, it usually takes about 10s to have pv updated, so I put 30 seconds there. It is a good point to keep tracking the status instead of waiting, it is updated now

@AndyXiangLi AndyXiangLi force-pushed the e2e-test-volume-resize branch 2 times, most recently from da63679 to f1afc5a Compare January 27, 2021 18:16
for start := time.Now(); time.Since(start) < timeout; time.Sleep(interval) {
newPv, _ := c.CoreV1().PersistentVolumes().Get(pvName, metav1.GetOptions{})
newPvSize := newPv.Spec.Capacity["storage"]
if desiredSize.Equal(newPvSize) {
Copy link
Contributor

@ayberk ayberk Jan 28, 2021

Choose a reason for hiding this comment

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

you also need to return an error if they're not equal, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it will return error if they are not equal and timeout at line 91

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see we can't exit early.

@AndyXiangLi AndyXiangLi force-pushed the e2e-test-volume-resize branch from f1afc5a to e899154 Compare January 28, 2021 17:00
@AndyXiangLi
Copy link
Contributor Author

/retest

@ayberk
Copy link
Contributor

ayberk commented Jan 29, 2021

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 29, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AndyXiangLi, ayberk

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 29, 2021
@AndyXiangLi
Copy link
Contributor Author

/retest

@AndyXiangLi
Copy link
Contributor Author

/test pull-aws-ebs-csi-driver-e2e-single-az

@AndyXiangLi AndyXiangLi force-pushed the e2e-test-volume-resize branch from e899154 to c5eba4f Compare January 30, 2021 02:12
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 30, 2021
@ayberk
Copy link
Contributor

ayberk commented Jan 30, 2021

/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 30, 2021
@k8s-ci-robot k8s-ci-robot merged commit 9d868af into kubernetes-sigs:master Jan 30, 2021
@gnufied
Copy link
Contributor

gnufied commented Feb 1, 2021

@ayberk @AndyXiangLi why are we doing this? We already had e2e via testsuites of CSI driver. I don't think we need more e2e (or if anything is missing it should be added to k/k repo).

@ayberk
Copy link
Contributor

ayberk commented Feb 1, 2021

Can you point me to the e2e tests on the k/k repo? I'll make sure all new tests go there instead.

@gnufied
Copy link
Contributor

gnufied commented Feb 1, 2021

here we go - https://github.com/kubernetes/kubernetes/blob/master/test/e2e/storage/testsuites/volume_expand.go

We should be running these tests as part of this driver's e2e.

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add e2e test for volume resize
5 participants