-
Notifications
You must be signed in to change notification settings - Fork 39k
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
Use framework.ExpectNoError() for e2e tests #77103
Comments
/sig testing |
I can work to following items.
|
I think that we can replace
|
@k-toyoda-pi Thanks, I updated the list based on your comment :-) |
Thanks, I can work to the following item.
|
I can work to the following item.
|
I want to take the files below. test/e2e/apimachinery
test/e2e/network
test/e2e/node
test/e2e/instrumentation
test/e2e/kubectl
test/e2e/scalability
test/e2e/scheduling
test/e2e/servicecatalog
test/e2e/ui
test/e2e/upgrades/apps
test/e2e/upgrades
test/e2e/upgrades/storage
test/e2e/windows And I use the following cmd to do the refactor, which may be helpful.
|
I am creating a hacking script which detects what code we need to update for this issue as #77612 |
Here is the remaining files with $ ag -l "gomega\.Expect\(err\)\.NotTo\(gomega.HaveOccurred\(\)\)" .
test/e2e/lifecycle/kubelet_security.go
test/e2e/lifecycle/reboot.go
test/e2e/lifecycle/restart.go
test/e2e/lifecycle/resize_nodes.go
test/e2e/common/pods.go
test/e2e/upgrades/storage/persistent_volumes.go
test/e2e/upgrades/storage/volume_mode.go
test/e2e/upgrades/apps/statefulset.go
test/e2e/upgrades/apps/job.go
test/e2e/apps/deployment.go
test/e2e/apps/daemon_set.go I'd like to take files except for
|
|
Thank you everyone who are fighting for this issue. |
Feel free to |
This is the remaining file with the common formats
I'll take care of the |
Thanks for doing this again @draveness |
Yeah, that would be great, but we have to fix all the |
Thanks everyone, all PRs are ready for fixing this issue at this time. |
It seems that some files in e2e/common contain "Expect(err).NotTo(HaveOccurred()".
Oops, it might cause conflict between #77852 and this ... |
I'll work on this after the above PRs get merged. |
I believe that |
It seems that "Expect(err).NotTo(gomega.HaveOccurred())" remains with some files under test/e2e/storage/vsphere. |
This is a really nice point, I also think they are the same. |
@s-ito-ts Thanks approved. |
Sorry, that was my bad. I've taken care of that with the above PR. |
Hi! Noticed that this only checked the normal e2e tests. I have made the script check |
What happened:
After fixing golint failures under
test/e2e
(now still in progress), we need to putgomega
for eachExpect()
andHaveOccurred()
.Then very common error checking code has become like:
gomega.Expect(err).NotTo(gomega.HaveOccurred())
We can replace this code with
framework.ExpectNoError(err)
which is more readable and easy to be understood what the code does.Now we have following e2e test directories which can be replaced:
( - [x] shows done)
After finishing all the above, we need to add the checking script to the CI system for blocking PRs which contain this issue:
The text was updated successfully, but these errors were encountered: