Skip to content

Commit 4d0d832

Browse files
committed
test: fix unit test failure
1 parent ec674a7 commit 4d0d832

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

pkg/azurefile/controllerserver_test.go

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,33 +1430,6 @@ var _ = ginkgo.Describe("TestCopyVolume", func() {
14301430
ginkgo.AfterEach(func() {
14311431
ctrl.Finish()
14321432
})
1433-
ginkgo.When("restore volume from volumeSnapshot nfs is not supported", func() {
1434-
ginkgo.It("should fail", func(ctx context.Context) {
1435-
allParam := map[string]string{}
1436-
1437-
volumeSnapshotSource := &csi.VolumeContentSource_SnapshotSource{
1438-
SnapshotId: "unit-test",
1439-
}
1440-
volumeContentSourceSnapshotSource := &csi.VolumeContentSource_Snapshot{
1441-
Snapshot: volumeSnapshotSource,
1442-
}
1443-
volumecontensource := csi.VolumeContentSource{
1444-
Type: volumeContentSourceSnapshotSource,
1445-
}
1446-
1447-
req := &csi.CreateVolumeRequest{
1448-
Name: "random-vol-name-valid-request",
1449-
VolumeCapabilities: stdVolCap,
1450-
CapacityRange: lessThanPremCapRange,
1451-
Parameters: allParam,
1452-
VolumeContentSource: &volumecontensource,
1453-
}
1454-
1455-
expectedErr := fmt.Errorf("protocol nfs is not supported for snapshot restore")
1456-
err := d.copyVolume(ctx, req, "", "", []string{}, "", &ShareOptions{Protocol: armstorage.EnabledProtocolsNFS}, nil, "core.windows.net")
1457-
gomega.Expect(err).To(gomega.Equal(expectedErr))
1458-
})
1459-
})
14601433
ginkgo.When("restore volume from volumeSnapshot not found", func() {
14611434
ginkgo.It("should fail", func(ctx context.Context) {
14621435
allParam := map[string]string{}
@@ -1511,33 +1484,6 @@ var _ = ginkgo.Describe("TestCopyVolume", func() {
15111484
gomega.Expect(err).To(gomega.Equal(expectedErr))
15121485
})
15131486
})
1514-
ginkgo.When("copy volume nfs is not supported", func() {
1515-
ginkgo.It("should fail", func(ctx context.Context) {
1516-
allParam := map[string]string{}
1517-
1518-
volumeSource := &csi.VolumeContentSource_VolumeSource{
1519-
VolumeId: "unit-test",
1520-
}
1521-
volumeContentSourceVolumeSource := &csi.VolumeContentSource_Volume{
1522-
Volume: volumeSource,
1523-
}
1524-
volumecontensource := csi.VolumeContentSource{
1525-
Type: volumeContentSourceVolumeSource,
1526-
}
1527-
1528-
req := &csi.CreateVolumeRequest{
1529-
Name: "random-vol-name-valid-request",
1530-
VolumeCapabilities: stdVolCap,
1531-
CapacityRange: lessThanPremCapRange,
1532-
Parameters: allParam,
1533-
VolumeContentSource: &volumecontensource,
1534-
}
1535-
1536-
expectedErr := fmt.Errorf("protocol nfs is not supported for volume cloning")
1537-
err := d.copyVolume(ctx, req, "", "", []string{}, "", &ShareOptions{Protocol: armstorage.EnabledProtocolsNFS}, nil, "core.windows.net")
1538-
gomega.Expect(err).To(gomega.Equal(expectedErr))
1539-
})
1540-
})
15411487
ginkgo.When("copy volume from volume not found", func() {
15421488
ginkgo.It("should fail", func(ctx context.Context) {
15431489
allParam := map[string]string{}

0 commit comments

Comments
 (0)