@@ -123,7 +123,7 @@ func TestVolumeNoAuth(t *testing.T) {
123
123
124
124
newspec := req .GetSpec ()
125
125
newspec .Size = newsize
126
- resp := driverclient .Set (id , req .GetLocator (), newspec )
126
+ resp := driverclient .Set (context . TODO (), id , req .GetLocator (), newspec )
127
127
assert .Nil (t , resp )
128
128
129
129
// INSPECT
@@ -793,7 +793,7 @@ func TestVolumeSetSuccess(t *testing.T) {
793
793
Spec : & api.VolumeSpec {Size : newsize },
794
794
}
795
795
796
- res := driverclient .Set (id , req .GetLocator (), req2 .GetSpec ())
796
+ res := driverclient .Set (context . TODO (), id , req .GetLocator (), req2 .GetSpec ())
797
797
assert .Nil (t , res )
798
798
799
799
// Assert volume information is correct
@@ -808,13 +808,11 @@ func TestVolumeSetSuccess(t *testing.T) {
808
808
assert .Equal (t , newsize , r .GetVolume ().GetSpec ().GetSize ())
809
809
810
810
// Send HA request
811
- res = driverclient .Set (id ,
812
- nil ,
813
- & api.VolumeSpec {
814
- HaLevel : 2 ,
815
- ReplicaSet : & api.ReplicaSet {Nodes : []string {}},
816
- SnapshotInterval : math .MaxUint32 ,
817
- })
811
+ res = driverclient .Set (context .TODO (), id , nil , & api.VolumeSpec {
812
+ HaLevel : 2 ,
813
+ ReplicaSet : & api.ReplicaSet {Nodes : []string {}},
814
+ SnapshotInterval : math .MaxUint32 ,
815
+ })
818
816
assert .Nil (t , res , fmt .Sprintf ("Error: %v" , res ))
819
817
820
818
// Assert volume information is correct
@@ -884,7 +882,7 @@ func TestVolumeSetFailed(t *testing.T) {
884
882
Spec : & api.VolumeSpec {Size : size , HaLevel : halevel },
885
883
}
886
884
// Cannot get this to fail....
887
- err = driverclient .Set ("doesnotexist" , req2 .GetLocator (), req2 .GetSpec ())
885
+ err = driverclient .Set (context . TODO (), "doesnotexist" , req2 .GetLocator (), req2 .GetSpec ())
888
886
// assert.NotNil(t, err)
889
887
890
888
// Assert volume information is correct
@@ -929,7 +927,7 @@ func TestMiddlewareVolumeSetSizeSuccess(t *testing.T) {
929
927
930
928
// Not setting mock secrets
931
929
932
- err = driverclient .Set (id , nil , req .GetSpec ())
930
+ err = driverclient .Set (context . TODO (), id , nil , req .GetSpec ())
933
931
assert .NoError (t , err , "Unexpected error on Set" )
934
932
935
933
// Assert volume information is correct
@@ -976,7 +974,7 @@ func TestMiddlewareVolumeSetFailure(t *testing.T) {
976
974
977
975
// Not setting mock secrets
978
976
979
- err = driverclient .Set (id , & api.VolumeLocator {Name : "myvol" }, req .GetSpec ())
977
+ err = driverclient .Set (context . TODO (), id , & api.VolumeLocator {Name : "myvol" }, req .GetSpec ())
980
978
assert .Error (t , err , "Unexpected error on Set" )
981
979
982
980
}
0 commit comments