-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add integration tests on Git action #69
Conversation
@jingxu97: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ddebroy, jingxu97 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 |
can you continue working on the unit test failures @mayankshah1607 , thanks:
|
let's enable all unit tests on Windows |
/hold |
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.
csi-proxy.exe needs to be built and started first.
.github/workflows/windows.yml
Outdated
@@ -26,3 +26,6 @@ jobs: | |||
- name: Run Windows Unit Tests | |||
run: | | |||
go test -v -race ./internal/... | |||
- name: Run Windows Integration Tests | |||
run: | | |||
go test -v -race ./integrationtests/... |
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 integration tests expect csi-proxy binary to be built and running with the named pipes for the API groups listening. Otherwise, the tests would fail when trying to connect to the named pipes. Please build and start csi-proxy before executing the tests.
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.
@ddebroy do you have guideline about how to do this? especially this: running with the named pipes for the API groups listening
@mayankshah1607 could help while need your guide first, 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.
There are a few projects depending on this csi-proxy, and if there is an example solution about how to run unit test on csi-proxy, that would be great.
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.
@andyzhangx sorry about the delay in responding. The unit tests for csi-proxy are rather minimal as there isn't a lot of internal logic. I think the focus of this PR around integration tests (of the csi-proxy clients interacting with the underlying Windows APIs/cmdlets) would be ideal to enable. The only piece missing here is building and running csi-proxy before invoking go test -v -race ./integrationtests/...
.
csi-proxy can be built and run using go build -a -o _output/csi-proxy.exe ./cmd/csi-proxy
as the build action is already doing followed by starting csi-proxy.exe by simply starting the executable: csi-proxy.exe
. Note that csi-proxy.exe
will run indefinitely, so if github action has a way to start it as a background exe that will be great. Alternative would be to register and start csi-proxy.exe
in service mode:
sc create csiproxy binPath= "C:\csiproxy\csi-proxy.exe --windows-service"
net start csiproxy
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.
We're running csi-proxy.exe
in GH Actions as a background process in the csi-driver-smb repo - https://github.com/kubernetes-csi/csi-driver-smb/blob/master/.github/workflows/windows.yml#L28
Maybe we could do the same here as well?
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.
@mayankshah1607 pls go ahead with another PR, I think there could be a lot more work to do besides github action config change. Thanks.
9c681f4
to
d889690
Compare
New changes are detected. LGTM label has been removed. |
b441b2a
to
9954702
Compare
Add integration tests
9954702
to
867c052
Compare
@jingxu97: PR needs rebase. 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. |
This PR is superseded by #90. Closing this. |
Add integration tests
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: