-
Notifications
You must be signed in to change notification settings - Fork 558
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
Run upstream e2e tests #55
Conversation
ac2fc4d
to
e79735a
Compare
/retest |
|
/test pull-aws-efs-csi-driver-e2e |
0db9529
to
030db3d
Compare
/test pull-aws-efs-csi-driver-e2e |
Ran 23 of 141 Specs in 1316.602 seconds However, it's not separated by testcase in testgrid, so I'd like to figure that out: https://testgrid.k8s.io/sig-aws-efs-csi-driver#e2e-test-single-az |
you need to generate some junit xml files from your job |
d53a4ac
to
03e5519
Compare
Yay, working now. Changes needed:
|
1d3c15c
to
3063b1e
Compare
/test pull-aws-efs-csi-driver-unit |
kubectl apply -f $TEST_DIR/manifest.yaml | ||
|
||
echo "Creating EFS file system" | ||
aws efs create-file-system --creation-token $TEST_ID --tags Key=KubernetesCluster,Value=$CLUSTER_NAME.k8s.local --region $REGION |
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 will make transition to the new test framework harder. Could we create the EFS fs in the go test code?
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.
That's the plan but atm it makes sense to keep this in the script to reuse the various env vars
hack/run-e2e-test
Outdated
fi | ||
|
||
pushd ./test/e2e | ||
$DEP_PATH ensure |
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.
why is go dep needed?
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.
Only way to vendor k/k into the test/e2e directory. I don't want to check in huge vendor so have to download dep and do dep ensure during 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.
I think it works for EBS to consume k/k with just go mod. See here
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, but that is with 1.14 k/k. After 1.15, k/k moved to modules and I can't use go mod anymore. (Seems like it doesn't make sense, I know)
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.
More details: when k/k used godeps, it just symlinked stuff in staging dir into vendor dir. Now with go.mod, it uses some weird tricks with v0.0.0 https://github.com/kubernetes/kubernetes/blob/master/go.mod#L144 and replace
directives and I've not figured out a way to import it using go mod.
test/e2e/e2e_test.go
Outdated
cancelPodLogs := testsuites.StartPodLogs(f) | ||
|
||
/* TODO deploy the driver before the test. | ||
cleanup, err := f.CreateFromManifests(nil, "deploy/kubernetes/manifest.yaml") |
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.
Is this needed?
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.
No, removed; much simpler to do the build+push+deploy of driver in the script beforehand.
/lgtm |
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.
/lgtm
minor comments
@@ -0,0 +1,22 @@ | |||
#!/bin/sh |
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 add a copyright head similar to other scripts?
seems the test reporter for prow ARTIFACT is not working. could you check on that? the e2e test failed too |
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.
/lgtm
minor comment
/hold cancel |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: leakingtapan, 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 |
Is this a bug fix or adding new feature? new feature
What is this PR about? / Why do we need it? ref: #32. We should run all the existing upstream tests for storage drivers. They cover static provisioning, RWX mode from multiple pods, and more.
hack/run-e2e-test is based on the one in EBS CSI repo: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/master/hack/run-e2e-test. It creates a kops cluster, creates an EFS file system, runs tests, and cleans up.
test/e2e/e2e_test.go is the tests themselves. It simply imports the upstream test suites and runs them.
depends on #48 and #51
Also depends on kubernetes/kubernetes#80375
What testing is done?
I edited the script to point to my s3 bucket instead of s3://k8s-kops-csi-e2e. Then, I ran
make test-e2e
as I would expect prow to.Skipping slow tests (by manually editing hack/run-e2e-test script):
Ran 11 of 142 Specs in 330.736 seconds
SUCCESS! -- 11 Passed | 0 Failed | 0 Pending | 131 Skipped
--- PASS: TestEFSCSI (330.74s)
PASS
ok github.com/kubernetes-sigs/aws-efs-csi-driver/test/e2e 331.139s
Running all tests:
Ran 23 of 142 Specs in 1310.545 seconds
SUCCESS! -- 23 Passed | 0 Failed | 0 Pending | 119 Skipped
--- PASS: TestEFSCSI (1310.55s)
PASS
ok github.com/kubernetes-sigs/aws-efs-csi-driver/test/e2e 1310.917s
I am not sure if the prow AWS account has permissions to create EFS file systems, I ran the test using an admin account. The plan is to add the prow job and tweak it later.