-
Notifications
You must be signed in to change notification settings - Fork 803
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
Refactor controller unit test with proper mock #220
Comments
+1 The fake cloud provider object was introduced way before I started using gomock, so we should definitely get rid of it in unit tests. |
If no one has taken this up, I'd like to contribute |
@zacharya I updated the issue description. let me know if you have any questions, will be happy to clarify more. |
I submitted #269 for this. Let me know if you have any issues with the implementation or test refactors. |
/close |
@leakingtapan: Closing this issue. In response to this:
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. |
…ency-openshift-4.14-ose-aws-ebs-csi-driver Updating ose-aws-ebs-csi-driver images to be consistent with ART
Proper mocking should be used for controller unit testing instead of using the current fake cloud provider that has fake logic that are implemented for sanity testing purpose.
Goal
tests/sanity
package and make sure it is only used thereReference PR
Could you create a
mock_cloud
using gomock? With that, we could truly unit test controller service without depending on the fake cloud implementation.Here is something similar I did for another driver: https://github.com/aws/aws-fsx-csi-driver/blob/master/pkg/driver/controller_test.go#L224
Originally posted by @leakingtapan in #219
The text was updated successfully, but these errors were encountered: