@@ -36,7 +36,7 @@ func TestEnableVolumeReplication(t *testing.T) {
3636 client := mockedEnableReplication
3737 resp , err := client .EnableVolumeReplication ("" , "" , nil , nil )
3838 require .Equal (t , & replicationlib.EnableVolumeReplicationResponse {}, resp )
39- require .Nil (t , err )
39+ require .NoError (t , err )
4040
4141 // return error
4242 mockedEnableReplication = & fake.ReplicationClient {
@@ -47,7 +47,7 @@ func TestEnableVolumeReplication(t *testing.T) {
4747 client = mockedEnableReplication
4848 resp , err = client .EnableVolumeReplication ("" , "" , nil , nil )
4949 require .Nil (t , resp )
50- require .NotNil (t , err )
50+ require .Error (t , err )
5151}
5252
5353func TestDisableVolumeReplication (t * testing.T ) {
@@ -60,7 +60,7 @@ func TestDisableVolumeReplication(t *testing.T) {
6060 client := mockedDisableReplication
6161 resp , err := client .DisableVolumeReplication ("" , "" , nil , nil )
6262 require .Equal (t , & replicationlib.DisableVolumeReplicationResponse {}, resp )
63- require .Nil (t , err )
63+ require .NoError (t , err )
6464
6565 // return error
6666 mockedDisableReplication = & fake.ReplicationClient {
@@ -71,7 +71,7 @@ func TestDisableVolumeReplication(t *testing.T) {
7171 client = mockedDisableReplication
7272 resp , err = client .DisableVolumeReplication ("" , "" , nil , nil )
7373 require .Nil (t , resp )
74- require .NotNil (t , err )
74+ require .Error (t , err )
7575}
7676
7777func TestPromoteVolume (t * testing.T ) {
@@ -85,7 +85,7 @@ func TestPromoteVolume(t *testing.T) {
8585 client := mockedPromoteVolume
8686 resp , err := client .PromoteVolume ("" , "" , false , nil , nil )
8787 require .Equal (t , & replicationlib.PromoteVolumeResponse {}, resp )
88- require .Nil (t , err )
88+ require .NoError (t , err )
8989
9090 // return error
9191 mockedPromoteVolume = & fake.ReplicationClient {
@@ -96,7 +96,7 @@ func TestPromoteVolume(t *testing.T) {
9696 client = mockedPromoteVolume
9797 resp , err = client .PromoteVolume ("" , "" , false , nil , nil )
9898 require .Nil (t , resp )
99- require .NotNil (t , err )
99+ require .Error (t , err )
100100}
101101
102102func TestDemoteVolume (t * testing.T ) {
@@ -110,7 +110,7 @@ func TestDemoteVolume(t *testing.T) {
110110 client := mockedDemoteVolume
111111 resp , err := client .DemoteVolume ("" , "" , nil , nil )
112112 require .Equal (t , & replicationlib.DemoteVolumeResponse {}, resp )
113- require .Nil (t , err )
113+ require .NoError (t , err )
114114
115115 // return error
116116 mockedDemoteVolume = & fake.ReplicationClient {
@@ -121,7 +121,7 @@ func TestDemoteVolume(t *testing.T) {
121121 client = mockedDemoteVolume
122122 resp , err = client .DemoteVolume ("" , "" , nil , nil )
123123 require .Nil (t , resp )
124- require .NotNil (t , err )
124+ require .Error (t , err )
125125}
126126
127127func TestResyncVolume (t * testing.T ) {
@@ -135,7 +135,7 @@ func TestResyncVolume(t *testing.T) {
135135 client := mockedResyncVolume
136136 resp , err := client .ResyncVolume ("" , "" , nil , nil )
137137 require .Equal (t , & replicationlib.ResyncVolumeResponse {}, resp )
138- require .Nil (t , err )
138+ require .NoError (t , err )
139139
140140 // return error
141141 mockedResyncVolume = & fake.ReplicationClient {
@@ -146,5 +146,5 @@ func TestResyncVolume(t *testing.T) {
146146 client = mockedResyncVolume
147147 resp , err = client .ResyncVolume ("" , "" , nil , nil )
148148 require .Nil (t , resp )
149- require .NotNil (t , err )
149+ require .Error (t , err )
150150}
0 commit comments