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

Add sanity test #54

Merged
merged 1 commit into from
Jul 26, 2019
Merged

Conversation

wongma7
Copy link
Contributor

@wongma7 wongma7 commented Jul 19, 2019

Is this a bug fix or adding new feature? new feature

What is this PR about? / Why do we need it? fixes #13, tests the driver against sanity tests from https://github.com/kubernetes-csi/csi-test

I put it in the driver pkg to reuse the mocking & internal structs.

depends on #48.

What testing is done? make test passes. We run 10 node-specific sanity test cases, full output:

=== RUN   TestSanityEFSCSI
Running Suite: CSI Driver Test Suite
====================================
Random Seed: 1563576630
Will run 20 of 72 specs

•••••E0719 15:50:30.952578   75593 driver.go:71] GRPC error: rpc error: code = InvalidArgument desc = Target path not provided
•E0719 15:50:30.955285   75593 driver.go:71] GRPC error: rpc error: code = InvalidArgument desc = Target path not provided
•E0719 15:50:30.957459   75593 driver.go:71] GRPC error: rpc error: code = InvalidArgument desc = Volume capability not provided
•E0719 15:50:30.959714   75593 driver.go:71] GRPC error: rpc error: code = InvalidArgument desc = Target path not provided
•E0719 15:50:30.961654   75593 driver.go:71] GRPC error: rpc error: code = InvalidArgument desc = Target path not provided
•
------------------------------
S [SKIPPING] in Spec Setup (BeforeEach) [0.003 seconds]
Node Service
/Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/tests.go:44
  NodeStageVolume
  /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:246
    should fail when no volume id is provided [BeforeEach]
    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:259

    NodeStageVolume not supported

    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:253
------------------------------
S [SKIPPING] in Spec Setup (BeforeEach) [0.003 seconds]
Node Service
/Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/tests.go:44
  NodeStageVolume
  /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:246
    should fail when no staging target path is provided [BeforeEach]
    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:285

    NodeStageVolume not supported

    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:253
------------------------------
S [SKIPPING] in Spec Setup (BeforeEach) [0.003 seconds]
Node Service
/Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/tests.go:44
  NodeStageVolume
  /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:246
    should fail when no volume capability is provided [BeforeEach]
    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:311

    NodeStageVolume not supported

    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:253
------------------------------
S [SKIPPING] in Spec Setup (BeforeEach) [0.004 seconds]
Node Service
/Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/tests.go:44
  NodeUnstageVolume
  /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:372
    should fail when no volume id is provided [BeforeEach]
    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:379

    NodeUnstageVolume not supported

    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:375
------------------------------
S [SKIPPING] in Spec Setup (BeforeEach) [0.004 seconds]
Node Service
/Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/tests.go:44
  NodeUnstageVolume
  /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:372
    should fail when no staging target path is provided [BeforeEach]
    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:393

    NodeUnstageVolume not supported

    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:375
------------------------------
S [SKIPPING] in Spec Setup (BeforeEach) [0.003 seconds]
Node Service
/Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/tests.go:44
  NodeGetVolumeStats
  /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:408
    should fail when no volume id is provided [BeforeEach]
    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:415

    NodeGetVolume not supported

    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:411
------------------------------
S [SKIPPING] in Spec Setup (BeforeEach) [0.003 seconds]
Node Service
/Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/tests.go:44
  NodeGetVolumeStats
  /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:408
    should fail when no volume path is provided [BeforeEach]
    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:429

    NodeGetVolume not supported

    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:411
------------------------------
S [SKIPPING] in Spec Setup (BeforeEach) [0.005 seconds]
Node Service
/Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/tests.go:44
  NodeGetVolumeStats
  /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:408
    should fail when volume is not found [BeforeEach]
    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:443

    NodeGetVolume not supported

    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:411
------------------------------
S [SKIPPING] in Spec Setup (BeforeEach) [0.005 seconds]
Node Service
/Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/tests.go:44
  NodeGetVolumeStats
  /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:408
    should fail when volume does not exist on the specified path [BeforeEach]
    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:458

    NodeGetVolume not supported

    /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:411
------------------------------
S [SKIPPING] [0.003 seconds]
Node Service
/Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/tests.go:44
  should work [It]
  /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:643

  Controller Service not provided: CreateVolume not supported

  /Users/mattwon/go/pkg/mod/github.com/kubernetes-csi/csi-test@v2.0.2-0.20190719174114-bc42f92ebdc8+incompatible/pkg/sanity/node.go:645
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
Ran 10 of 72 Specs in 0.061 seconds
SUCCESS! -- 10 Passed | 0 Failed | 0 Pending | 62 Skipped

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 19, 2019
@wongma7
Copy link
Contributor Author

wongma7 commented Jul 25, 2019

rebased

@leakingtapan
Copy link
Contributor

/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 Jul 26, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: leakingtapan, wongma7

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 Jul 26, 2019
@k8s-ci-robot k8s-ci-robot merged commit c6e514e into kubernetes-sigs:master Jul 26, 2019
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

Add sanity test
3 participants