Skip to content

Commit

Permalink
raw volumes were added to the next cases:
Browse files Browse the repository at this point in the history
- ExpandVolume [Controller Server]
- CreateSnapshot [Controller Server]
- DeleteSnapshot [Controller Server]
- ListSnapshots [Controller Server]
- ControllerPublishVolume
- CreateVolume
    - from snapshot
    - from source volume

Signed-off-by: Dmytro Tsapko <dmytro.tsapko@gmail.com>
  • Loading branch information
taaraora committed Jun 1, 2020
1 parent e89bc15 commit e3f6925
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
15 changes: 5 additions & 10 deletions pkg/sanity/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
Expect(serverError.Code()).To(Equal(codes.InvalidArgument))
})

It("should return appropriate values SingleNodeWriter NoCapacity Type:Mount", func() {
// TODO: whether CreateVolume request with no capacity should fail or not depends on driver implementation
It("should return appropriate values SingleNodeWriter NoCapacity", func() {

By("creating a volume")
name := UniqueString("sanity-controller-create-single-no-capacity")
Expand Down Expand Up @@ -454,7 +455,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *TestCo
cl.UnregisterVolume(name)
})

It("should return appropriate values SingleNodeWriter WithCapacity 1Gi Type:Mount", func() {
It("should return appropriate values SingleNodeWriter WithCapacity 1Gi", func() {

By("creating a volume")
name := UniqueString("sanity-controller-create-single-with-capacity")
Expand Down Expand Up @@ -1932,6 +1933,7 @@ var _ = DescribeSanity("ExpandVolume [Controller Server]", func(sc *TestContext)
RequiredBytes: TestVolumeExpandSize(sc),
},
Secrets: sc.Secrets.ControllerExpandVolumeSecret,
VolumeCapability: TestVolumeCapabilityWithAccessType(sc, csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER),
}
rsp, err := c.ControllerExpandVolume(context.Background(), expReq)
Expect(err).NotTo(HaveOccurred())
Expand All @@ -1957,14 +1959,7 @@ func MakeCreateVolumeReq(sc *TestContext, name string) *csi.CreateVolumeRequest
req := &csi.CreateVolumeRequest{
Name: name,
VolumeCapabilities: []*csi.VolumeCapability{
{
AccessType: &csi.VolumeCapability_Mount{
Mount: &csi.VolumeCapability_MountVolume{},
},
AccessMode: &csi.VolumeCapability_AccessMode{
Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER,
},
},
TestVolumeCapabilityWithAccessType(sc, csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER),
},
CapacityRange: &csi.CapacityRange{
RequiredBytes: size1,
Expand Down
2 changes: 1 addition & 1 deletion pkg/sanity/sanity.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func NewTestConfig() TestConfig {
StagingPath: os.TempDir() + "/csi-staging",
CreatePathCmdTimeout: 10 * time.Second,
RemovePathCmdTimeout: 10 * time.Second,
TestVolumeSize: 10 * 1024 * 1024 * 1024, // 10 GiB
TestVolumeSize: 1 * 1024 * 1024 * 1024, // 10 GiB
TestVolumeAccessType: "mount",
IDGen: &DefaultIDGenerator{},
IdempotentCount: 10,
Expand Down

0 comments on commit e3f6925

Please sign in to comment.