-
Notifications
You must be signed in to change notification settings - Fork 807
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
More e2e tests #173
More e2e tests #173
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 307
💛 - Coveralls |
Pull Request Test Coverage Report for Build 373
💛 - Coveralls |
/ok-to-test |
7aacc38
to
4d44efc
Compare
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've created a new cloud package in the e2e test folder that will Create/Delete volumes, unfortunately much of the code is duplicated from the pkg/ directory but it didn't feel right trying to reuse that code in the test.
What's the reason you think it is worth to duplicate the code?
for _, pod := range t.Pods { | ||
tpod, cleanup := pod.SetupWithPreProvisionedVolumes(client, namespace, t.CSIDriver) | ||
// defer must be called here for resources not get removed before using them | ||
for i := range cleanup { |
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.
NIT: Feels cleaner to implement the cleanup returned from SetupWithPreProvisionedVolumes
to clean all the volumes inside the cleanup itself.
@dkoshkin could you update the test done section, the result is outdated with latest changes |
1387209
to
f2ab799
Compare
// DynamicallyProvisionedDeletePodTest will provision required StorageClass and Deployment | ||
// Testing if the Pod can write and read to mounted volumes | ||
// Deleting a pod, and again testing if the Pod can write and read to mounted volumes | ||
type DynamicallyProvisionedDeletePodTest struct { |
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 didn't find where do we run this test case, and im not sure why do we need to test it through deployment. For the sake of limiting the scope of this PR, can we hold off on this test case?
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.
The file was probably collapsed, here is the test: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/173/files#diff-4b7e52cf33a96cc1c8a4d9974c34027aR315
I would prefer to keep this test as its actually pretty important, this is the only one thats tests the scenario of what happens when a pod restarts and the volume gets remounted, it tests the detach/attach flow and validates that the volume is not being formatted after the second attach.
@dkoshkin let's squash the commits into one and run |
@leakingtapan after your LGTM, I'll squash. |
/lgtm Have one minor comment about nil passing. |
* Update README with more detail to run E2E * Cleanup cloud code * Delete pod E2e test * Properly delete EBS volumes with Retain reclaimPolicy * Properly cleanup PV for pre-provisioned tests * Prefix tester structs with DynamicallyProvisioned * Automatically create/delete volumes for pre-provisioned tests * Modify E2E tests Ginkgo structure * Colocated pods E2E test * Topology aware E2E test * ReclaimPolicy E2E test * Pre-provisioned volume E2E test * Add more E2E tests * should create a volume on demand and mount it as readOnly in a pod * should create a volume on demand with provided mountOptions * should create a volume with encryption (+2 squashed commits)
Squashed and rebased onto master and fixed the failing unit tests. |
/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 |
The coverage drop is caused by new constructor introduced for e2e testing. |
…openshift-4.7-ose-aws-ebs-csi-driver Updating ose-aws-ebs-csi-driver builder & base images to be consistent with ART
Is this a bug fix or adding new feature?
/Feature
Fixes: #118
What is this PR about? / Why do we need it?
Introduces many of the tests outlined in #118, the ones that are left are the
Failure Scenarios
In this PR a few of the tests require EBS volumes to already exist, I've created a new
cloud
package in the e2e test folder that will Create/Delete volumes, unfortunately much of the code is duplicated from thepkg/
directory but it didn't feel right trying to reuse that code in the test.What testing is done?