@@ -46,7 +46,9 @@ func TestEnableVolumeReplication(t *testing.T) {
4646 return nil , errors .New ("failed to enable mirroring" )
4747 },
4848 }
49+
4950 client = mockedEnableReplication
51+
5052 resp , err = client .EnableVolumeReplication ("" , "" , nil , nil )
5153 require .Nil (t , resp )
5254 require .Error (t , err )
@@ -72,7 +74,9 @@ func TestDisableVolumeReplication(t *testing.T) {
7274 return nil , errors .New ("failed to disable mirroring" )
7375 },
7476 }
77+
7578 client = mockedDisableReplication
79+
7680 resp , err = client .DisableVolumeReplication ("" , "" , nil , nil )
7781 require .Nil (t , resp )
7882 require .Error (t , err )
@@ -98,7 +102,9 @@ func TestPromoteVolume(t *testing.T) {
98102 return nil , errors .New ("failed to promote volume" )
99103 },
100104 }
105+
101106 client = mockedPromoteVolume
107+
102108 resp , err = client .PromoteVolume ("" , "" , false , nil , nil )
103109 require .Nil (t , resp )
104110 require .Error (t , err )
@@ -124,7 +130,9 @@ func TestDemoteVolume(t *testing.T) {
124130 return nil , errors .New ("failed to demote volume" )
125131 },
126132 }
133+
127134 client = mockedDemoteVolume
135+
128136 resp , err = client .DemoteVolume ("" , "" , nil , nil )
129137 require .Nil (t , resp )
130138 require .Error (t , err )
@@ -150,7 +158,9 @@ func TestResyncVolume(t *testing.T) {
150158 return nil , errors .New ("failed to resync volume" )
151159 },
152160 }
161+
153162 client = mockedResyncVolume
163+
154164 resp , err = client .ResyncVolume ("" , "" , nil , nil )
155165 require .Nil (t , resp )
156166 require .Error (t , err )
0 commit comments