Skip to content

Commit 9fcb4b7

Browse files
committed
test: fix unit test failure
1 parent f1d5544 commit 9fcb4b7

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
@@ -1412,33 +1412,6 @@ var _ = ginkgo.Describe("TestCopyVolume", func() {
14121412
ginkgo.AfterEach(func() {
14131413
ctrl.Finish()
14141414
})
1415-
ginkgo.When("restore volume from volumeSnapshot nfs is not supported", func() {
1416-
ginkgo.It("should fail", func(ctx context.Context) {
1417-
allParam := map[string]string{}
1418-
1419-
volumeSnapshotSource := &csi.VolumeContentSource_SnapshotSource{
1420-
SnapshotId: "unit-test",
1421-
}
1422-
volumeContentSourceSnapshotSource := &csi.VolumeContentSource_Snapshot{
1423-
Snapshot: volumeSnapshotSource,
1424-
}
1425-
volumecontensource := csi.VolumeContentSource{
1426-
Type: volumeContentSourceSnapshotSource,
1427-
}
1428-
1429-
req := &csi.CreateVolumeRequest{
1430-
Name: "random-vol-name-valid-request",
1431-
VolumeCapabilities: stdVolCap,
1432-
CapacityRange: lessThanPremCapRange,
1433-
Parameters: allParam,
1434-
VolumeContentSource: &volumecontensource,
1435-
}
1436-
1437-
expectedErr := fmt.Errorf("protocol nfs is not supported for snapshot restore")
1438-
err := d.copyVolume(ctx, req, "", "", []string{}, "", &ShareOptions{Protocol: armstorage.EnabledProtocolsNFS}, nil, "core.windows.net")
1439-
gomega.Expect(err).To(gomega.Equal(expectedErr))
1440-
})
1441-
})
14421415
ginkgo.When("restore volume from volumeSnapshot not found", func() {
14431416
ginkgo.It("should fail", func(ctx context.Context) {
14441417
allParam := map[string]string{}
@@ -1493,33 +1466,6 @@ var _ = ginkgo.Describe("TestCopyVolume", func() {
14931466
gomega.Expect(err).To(gomega.Equal(expectedErr))
14941467
})
14951468
})
1496-
ginkgo.When("copy volume nfs is not supported", func() {
1497-
ginkgo.It("should fail", func(ctx context.Context) {
1498-
allParam := map[string]string{}
1499-
1500-
volumeSource := &csi.VolumeContentSource_VolumeSource{
1501-
VolumeId: "unit-test",
1502-
}
1503-
volumeContentSourceVolumeSource := &csi.VolumeContentSource_Volume{
1504-
Volume: volumeSource,
1505-
}
1506-
volumecontensource := csi.VolumeContentSource{
1507-
Type: volumeContentSourceVolumeSource,
1508-
}
1509-
1510-
req := &csi.CreateVolumeRequest{
1511-
Name: "random-vol-name-valid-request",
1512-
VolumeCapabilities: stdVolCap,
1513-
CapacityRange: lessThanPremCapRange,
1514-
Parameters: allParam,
1515-
VolumeContentSource: &volumecontensource,
1516-
}
1517-
1518-
expectedErr := fmt.Errorf("protocol nfs is not supported for volume cloning")
1519-
err := d.copyVolume(ctx, req, "", "", []string{}, "", &ShareOptions{Protocol: armstorage.EnabledProtocolsNFS}, nil, "core.windows.net")
1520-
gomega.Expect(err).To(gomega.Equal(expectedErr))
1521-
})
1522-
})
15231469
ginkgo.When("copy volume from volume not found", func() {
15241470
ginkgo.It("should fail", func(ctx context.Context) {
15251471
allParam := map[string]string{}

0 commit comments

Comments
 (0)