-
Notifications
You must be signed in to change notification settings - Fork 145
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
test: Add tests for csicommon/server #316
Conversation
Hi @animeshk08. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
/ok-to-test |
ee20ad4
to
cff45fe
Compare
/test pull-azurefile-csi-driver-sanity |
This commit adds unit tests for csicommon/server, csicommon/utils and azurefile/azurefile Signed-off-by: Animesh Kumar <animuz111@gmail.com>
This was a very tricky UT to write.
|
Partially fixes #258 |
The PR is ready for review @andyzhangx. I have tested it locally and the server is closed only while running in |
thanks. @animeshk08 I think it's ok now for writing such UT for csicommon/server, dig into more details on point# 3 may not help a lot. Could you work on other UTs? thanks. @ZeroMagic could you also help review whether there is issue? We may apply such unit tests for all the other CSI drivers. |
It looks good to me |
@@ -50,9 +49,11 @@ type nonBlockingGRPCServer struct { | |||
server *grpc.Server | |||
} | |||
|
|||
func (s *nonBlockingGRPCServer) Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer) { | |||
//var TestBool = false |
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: remove this in next PR, thanks.
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.
My bad. Will do it.
s.wg.Done() | ||
go func() { | ||
// make sure Serve() is called | ||
|
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: remove empty line in next PR.
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
/approve
@animeshk08 pls make same change on smb csi driver, thanks.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, animeshk08 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 |
@@ -17,21 +17,20 @@ limitations under the License. | |||
package csicommon | |||
|
|||
import ( | |||
"github.com/container-storage-interface/spec/lib/go/csi" |
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: pls keep sequence of import packages, e.g. first basic package, then github packages.
Signed-off-by: Animesh Kumar animuz111@gmail.com
What type of PR is this?
/kind test
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Requirements:
Special notes for your reviewer:
Release note: