@@ -732,7 +732,7 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *Sanity
732732
733733 By ("creating a snapshot" )
734734 snapName := UniqueString ("sanity-controller-snap-from-vol" )
735- snapReq := MakeCreateSnapshotReq (sc , snapName , volume1 .GetVolume ().GetVolumeId (), nil )
735+ snapReq := MakeCreateSnapshotReq (sc , snapName , volume1 .GetVolume ().GetVolumeId ())
736736 snap , err := c .CreateSnapshot (context .Background (), snapReq )
737737 Expect (err ).NotTo (HaveOccurred ())
738738 Expect (snap ).NotTo (BeNil ())
@@ -1650,7 +1650,7 @@ var _ = DescribeSanity("ListSnapshots [Controller Server]", func(sc *SanityConte
16501650 Expect (err ).NotTo (HaveOccurred ())
16511651
16521652 By ("creating a snapshot" )
1653- snapshotReq := MakeCreateSnapshotReq (sc , "listSnapshots-snapshot-1" , volume .GetVolume ().GetVolumeId (), nil )
1653+ snapshotReq := MakeCreateSnapshotReq (sc , "listSnapshots-snapshot-1" , volume .GetVolume ().GetVolumeId ())
16541654 snapshot , err := c .CreateSnapshot (context .Background (), snapshotReq )
16551655 Expect (err ).NotTo (HaveOccurred ())
16561656
@@ -1692,7 +1692,7 @@ var _ = DescribeSanity("ListSnapshots [Controller Server]", func(sc *SanityConte
16921692 Expect (err ).NotTo (HaveOccurred ())
16931693
16941694 By ("creating a snapshot" )
1695- snapshotReq := MakeCreateSnapshotReq (sc , "listSnapshots-snapshot-2" , volume .GetVolume ().GetVolumeId (), nil )
1695+ snapshotReq := MakeCreateSnapshotReq (sc , "listSnapshots-snapshot-2" , volume .GetVolume ().GetVolumeId ())
16961696 snapshot , err := c .CreateSnapshot (context .Background (), snapshotReq )
16971697 Expect (err ).NotTo (HaveOccurred ())
16981698
@@ -1743,7 +1743,7 @@ var _ = DescribeSanity("ListSnapshots [Controller Server]", func(sc *SanityConte
17431743 Expect (err ).NotTo (HaveOccurred ())
17441744
17451745 By ("creating a snapshot" )
1746- snapReq := MakeCreateSnapshotReq (sc , "listSnapshots-snapshot-3" , volume .GetVolume ().GetVolumeId (), nil )
1746+ snapReq := MakeCreateSnapshotReq (sc , "listSnapshots-snapshot-3" , volume .GetVolume ().GetVolumeId ())
17471747 snapshot , err := c .CreateSnapshot (context .Background (), snapReq )
17481748 Expect (err ).NotTo (HaveOccurred ())
17491749 Expect (snapshot ).NotTo (BeNil ())
@@ -1811,7 +1811,7 @@ var _ = DescribeSanity("ListSnapshots [Controller Server]", func(sc *SanityConte
18111811 Expect (volume ).NotTo (BeNil ())
18121812 createVols = append (createVols , volume .GetVolume ())
18131813
1814- snapReq := MakeCreateSnapshotReq (sc , "snapshot" + strconv .Itoa (i ), volume .GetVolume ().GetVolumeId (), nil )
1814+ snapReq := MakeCreateSnapshotReq (sc , "snapshot" + strconv .Itoa (i ), volume .GetVolume ().GetVolumeId ())
18151815 snapshot , err := c .CreateSnapshot (context .Background (), snapReq )
18161816 Expect (err ).NotTo (HaveOccurred ())
18171817 Expect (snapshot ).NotTo (BeNil ())
@@ -1915,7 +1915,7 @@ var _ = DescribeSanity("DeleteSnapshot [Controller Server]", func(sc *SanityCont
19151915
19161916 // Create Snapshot First
19171917 By ("creating a snapshot" )
1918- snapshotReq := MakeCreateSnapshotReq (sc , "DeleteSnapshot-snapshot-1" , volume .GetVolume ().GetVolumeId (), nil )
1918+ snapshotReq := MakeCreateSnapshotReq (sc , "DeleteSnapshot-snapshot-1" , volume .GetVolume ().GetVolumeId ())
19191919 snapshot , err := c .CreateSnapshot (context .Background (), snapshotReq )
19201920 Expect (err ).NotTo (HaveOccurred ())
19211921 Expect (snapshot ).NotTo (BeNil ())
@@ -1988,7 +1988,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont
19881988 Expect (err ).NotTo (HaveOccurred ())
19891989
19901990 By ("creating a snapshot" )
1991- snapReq1 := MakeCreateSnapshotReq (sc , "CreateSnapshot-snapshot-1" , volume .GetVolume ().GetVolumeId (), nil )
1991+ snapReq1 := MakeCreateSnapshotReq (sc , "CreateSnapshot-snapshot-1" , volume .GetVolume ().GetVolumeId ())
19921992 snap1 , err := c .CreateSnapshot (context .Background (), snapReq1 )
19931993 Expect (err ).NotTo (HaveOccurred ())
19941994 Expect (snap1 ).NotTo (BeNil ())
@@ -2017,7 +2017,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont
20172017 Expect (err ).ToNot (HaveOccurred ())
20182018
20192019 By ("creating a snapshot with the created volume source id" )
2020- req1 := MakeCreateSnapshotReq (sc , "CreateSnapshot-snapshot-2" , volume .GetVolume ().GetVolumeId (), nil )
2020+ req1 := MakeCreateSnapshotReq (sc , "CreateSnapshot-snapshot-2" , volume .GetVolume ().GetVolumeId ())
20212021 snap1 , err := c .CreateSnapshot (context .Background (), req1 )
20222022 Expect (err ).NotTo (HaveOccurred ())
20232023 Expect (snap1 ).NotTo (BeNil ())
@@ -2027,7 +2027,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont
20272027 Expect (err ).ToNot (HaveOccurred ())
20282028
20292029 By ("creating a snapshot with the same name but different volume source id" )
2030- req2 := MakeCreateSnapshotReq (sc , "CreateSnapshot-snapshot-2" , volume2 .GetVolume ().GetVolumeId (), nil )
2030+ req2 := MakeCreateSnapshotReq (sc , "CreateSnapshot-snapshot-2" , volume2 .GetVolume ().GetVolumeId ())
20312031 _ , err = c .CreateSnapshot (context .Background (), req2 )
20322032 Expect (err ).To (HaveOccurred ())
20332033 serverError , ok := status .FromError (err )
@@ -2059,7 +2059,7 @@ var _ = DescribeSanity("CreateSnapshot [Controller Server]", func(sc *SanityCont
20592059 name := string (nameBytes )
20602060
20612061 By ("creating a snapshot" )
2062- snapReq1 := MakeCreateSnapshotReq (sc , name , volume .GetVolume ().GetVolumeId (), nil )
2062+ snapReq1 := MakeCreateSnapshotReq (sc , name , volume .GetVolume ().GetVolumeId ())
20632063 snap1 , err := c .CreateSnapshot (context .Background (), snapReq1 )
20642064 Expect (err ).NotTo (HaveOccurred ())
20652065 Expect (snap1 ).NotTo (BeNil ())
@@ -2217,11 +2217,11 @@ func MakeCreateVolumeReq(sc *SanityContext, name string) *csi.CreateVolumeReques
22172217 return req
22182218}
22192219
2220- func MakeCreateSnapshotReq (sc * SanityContext , name , sourceVolumeId string , parameters map [ string ] string ) * csi.CreateSnapshotRequest {
2220+ func MakeCreateSnapshotReq (sc * SanityContext , name , sourceVolumeId string ) * csi.CreateSnapshotRequest {
22212221 req := & csi.CreateSnapshotRequest {
22222222 Name : name ,
22232223 SourceVolumeId : sourceVolumeId ,
2224- Parameters : parameters ,
2224+ Parameters : sc . Config . TestSnapshotParameters ,
22252225 }
22262226
22272227 if sc .Secrets != nil {
0 commit comments