-
Notifications
You must be signed in to change notification settings - Fork 806
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 first few e2e test cases #151
Conversation
Hi @dkoshkin. Thanks for your PR. I'm waiting for a kubernetes-sigs or kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
Pull Request Test Coverage Report for Build 268
💛 - Coveralls |
/ok-to-test |
1 similar comment
/ok-to-test |
@leakingtapan looks like the sanity test failed because I changed the way that test is run and it now depends on having the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -105,21 +105,21 @@ Please go through [CSI Spec](https://github.com/container-storage-interface/spec | |||
|
|||
### Requirements | |||
* Golang 1.11.2+ | |||
* [Ginkgo](https://github.com/onsi/ginkgo) for integration and end-to-end testing | |||
* [Ginkgo](https://github.com/onsi/ginkgo) in your PATH for end-to-end testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ginkgo is still needed for integration test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the user's perspective no, its a dependency that will be downloaded for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we requiring user to download themselves or we download it for them? I don't see we are doing it, did I miss something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- To run e2e, the user will need to download it themselves and make sure
ginkgo
binary is in their PATH. - For other tests its a dependency in go.mod and present in vendor dir so the user won't need to do anything special here besides running
go mod download
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also squash the commit with messages once all the changes are done?This will help a lot when generating release note during release.
But I should be able to do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests/e2e/dynamic_provisioning.go
Outdated
"github.com/kubernetes-sigs/aws-ebs-csi-driver/tests/e2e/testsuites" | ||
) | ||
|
||
var _ = Describe("[ebs-csi] Dynamic Provisioning", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this test requires all the worker nodes are in the same az? Otherwise it will randomly failure due to az mismatch without volume scheduling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats correct, maybe I can add a tag so users can skip when running it?
There will also be tests that test the topology aware scheduling feature.
volumeType2 := "io1" | ||
pods := []testsuites.PodDetails{ | ||
{ | ||
Cmd: "echo 'hello world' > /mnt/test-1/data && echo 'hello world' > /mnt/test-2/data && grep 'hello world' /mnt/test-1/data && grep 'hello world' /mnt/test-2/data", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a big deal for now. Seems the mount path in Cmd
is depending on how tpod.SetupVolume
works on generating the mount path and volume name. This might cause some issue when generation logic is changed but Cmd
is not updated to reflect the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I didnt like that either :(, as the tests evolve and more are written I'll try to find a way to improve that.
Yes as long as you have |
3868aee
to
9fb6f27
Compare
Yeah IMO until these tests are running automatically adding it in the testgrid doesn't really provide much value. |
One of the commits migrates from The kubernetes community migrated to that package in v1.13.
There isn't a real fix for that due to the way Go's vendoring works (this is one of the reasons why kubernetes migrated). Also the glog package hasn't been updated in years. |
Agree. @gyuho will help us setting up periodic prow job at the mean time when presubmit job is not ready. And when periodic job is ready, we can start adding into testgrid. |
@dkoshkin For klog change, could you squash the 5 commits into 2 commits? One is for adding e2e tests and once is for klog update. |
Some other changes required * Update Go and vendored Kubernetes versions * Update vendor directory * Disable go mod in Travis CI
* The Kubernetes has moved over to using k8s.io/klog * Using glog will cause "flag redefined: log_dir" when running e2e that import values from github.com/kubernetes-sigs/aws-ebs-csi-driver/ * Similar to issue kubernetes/kubernetes#35096
@leakingtapan squashed |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dkoshkin, leakingtapan 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 |
Is this a bug fix or adding new feature?
New Feature
What is this PR about? / Why do we need it?
This PR adds the first few scenarios to test the driver provisioning EBS volumes, attaching them to a pod and asserting data can be written and read on those volumes.
Closes #139
This is a follow up to #139 and as a result that PR would be closed if this one is approved and merged.
Some important distinctions between the PRs:
k8s.io/kubernetes/test/e2e/framework
package - which provides many utilities and helper functions for e2e testsThe intention of the above is to provide a framework for writing additional tests. However, as more scenarios are added it is expected that this code will need to be extended to support those.
Additional tests that we intend to write (not part of this PR):
IMPORTANT one of the new dependencies
k8s.io/kubernetes/test/e2e/framework
pulls inbitbucket.org/ww/goautoneg
which is a Mercurial repo hosted in Bitbucket. Unfortunately Travis does not support Mercurial.This is not an issue with Go 1.10 or when Go mods aren't enabled, so in this PR I've also set
GO111MODULE=off
. Another justification is that prow still does not use Go mods either so our build and test frameworks will at least look the same.Once either that dependency is dropped or there is some other fix we can re-enable it but
k8s.io/kubernetes/test/e2e/framework
provides some pretty crucial code and I don't want to just remove it at this point.What are everyone else's thoughts on this?
What testing is done?
Run e2e tests using images built with the latest code from
master
.