Skip to content
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: enable csi-proxy.exe in workflow and enable windows unit tests #556

Merged
merged 2 commits into from
Oct 5, 2020

Conversation

mayankshah1607
Copy link
Contributor

@mayankshah1607 mayankshah1607 commented Sep 29, 2020

Signed-off-by: Mayank Shah [email protected]

What type of PR is this?
/kind test

What this PR does / why we need it:
Enable windows unit tests and add CSI proxy mount to workflow
Which issue(s) this PR fixes:

Fixes #525

Requirements:

Special notes for your reviewer:

Release note:

none

@k8s-ci-robot k8s-ci-robot added kind/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 29, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @mayankshah1607. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 29, 2020
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 29, 2020
@mayankshah1607 mayankshah1607 force-pushed the windows-ut branch 2 times, most recently from a84855a to 631ce7e Compare September 29, 2020 13:04
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 29, 2020
@mayankshah1607 mayankshah1607 force-pushed the windows-ut branch 4 times, most recently from 3c6ea79 to 99aae52 Compare September 30, 2020 06:54
@mayankshah1607 mayankshah1607 changed the title test: enable csi-proxy.exe in workflow and enable windows unit tests [WIP] test: enable csi-proxy.exe in workflow and enable windows unit tests Sep 30, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 30, 2020
return TestError{
LinuxError: linuxError,
WindowsError: windowsError,
DarwinError: darwinError,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is DarwinError necessary? I thought it's same as LinuxError.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed in this PR that some test cases have slight variation in the error message across Darwin and Linux, so I thought it might make sense to have a separate field in this case

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe not, let's remove it first. Usually macos test error should be same as linux.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and also pls squash commits, thanks.

@mayankshah1607 mayankshah1607 changed the title [WIP] test: enable csi-proxy.exe in workflow and enable windows unit tests test: enable csi-proxy.exe in workflow and enable windows unit tests Sep 30, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 30, 2020
@mayankshah1607
Copy link
Contributor Author

@andyzhangx I've made the changes. This PR is ready :)

@andyzhangx
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 30, 2020
@mayankshah1607
Copy link
Contributor Author

/retest

@mayankshah1607 mayankshah1607 force-pushed the windows-ut branch 2 times, most recently from 961d74c to 2dcd839 Compare September 30, 2020 12:30
@mayankshah1607
Copy link
Contributor Author

/retest

@mayankshah1607
Copy link
Contributor Author

/retest

@mayankshah1607
Copy link
Contributor Author

/retest

@andyzhangx
Copy link
Member

/retest

@andyzhangx
Copy link
Member

andyzhangx commented Oct 2, 2020

@mayankshah1607 can you change this value to 180 * time.Second? I think 90s is not enough in Windows test. Also add a comment: // 90s is not enough in Windows disk detach test

desc: "Staging target missing ",
req: csi.NodeUnstageVolumeRequest{VolumeId: "vol_1"},
expectedErr: testutil.TestError{
LinuxError: status.Error(codes.InvalidArgument, "Staging target not provided"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andyzhangx The issue with that is that in some cases, Windows has a nil error. In that case, we need an explicit mention. For example -

WindowsError: nil, // different mount behaviour on windows,

Copy link
Member

@andyzhangx andyzhangx Oct 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's not an error case, we could skip that case on Windows, e.g. https://github.com/kubernetes-csi/csi-driver-smb/blob/36a4dbce197fa7dcb82b27d5548479c21b67c9e4/pkg/smb/nodeserver_test.go#L474

otherwise need to copy the error message for every case, that's a burden to write a test.

Copy link
Contributor Author

@mayankshah1607 mayankshah1607 Oct 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I have added the relevant changes. Thanks

@andyzhangx
Copy link
Member

@mayankshah1607 can you change this value to 180 * time.Second? I think 90s is not enough in Windows test. Also add a comment: // 90s is not enough in Windows disk detach test

already fixed by #563

@andyzhangx
Copy link
Member

/test pull-azuredisk-csi-driver-e2e-migration-windows

Signed-off-by: Mayank Shah <[email protected]>
Copy link
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 5, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, mayankshah1607

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 5, 2020
@andyzhangx
Copy link
Member

/retest

@andyzhangx
Copy link
Member

there is a random failure on Windows:

Failed to unmarshall layerchain json - invalid character '\x00' looking for beginning of value

@andyzhangx
Copy link
Member

/retest

1 similar comment
@andyzhangx
Copy link
Member

/retest

@k8s-ci-robot k8s-ci-robot merged commit eef5de2 into kubernetes-sigs:master Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/test lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reenable unit tests on Windows
3 participants