@@ -28,7 +28,7 @@ func CreateReplica(t *testing.T, client *gophercloud.ServiceClient, share *share
28
28
return nil , err
29
29
}
30
30
31
- _ , err = waitForReplicaStatus (t , client , replica .ID , "available" )
31
+ err = waitForReplicaStatus (t , client , replica .ID , "available" )
32
32
if err != nil {
33
33
t .Logf ("Failed to get %s replica status" , replica .ID )
34
34
DeleteReplica (t , client , replica )
@@ -49,7 +49,7 @@ func DeleteReplica(t *testing.T, client *gophercloud.ServiceClient, replica *rep
49
49
t .Errorf ("Unable to delete replica %s: %v" , replica .ID , err )
50
50
}
51
51
52
- _ , err = waitForReplicaStatus (t , client , replica .ID , "deleted" )
52
+ err = waitForReplicaStatus (t , client , replica .ID , "deleted" )
53
53
if err != nil {
54
54
t .Errorf ("Failed to wait for 'deleted' status for %s replica: %v" , replica .ID , err )
55
55
} else {
@@ -71,7 +71,7 @@ func ListShareReplicas(t *testing.T, client *gophercloud.ServiceClient, shareID
71
71
return replicas .ExtractReplicas (pages )
72
72
}
73
73
74
- func waitForReplicaStatus (t * testing.T , c * gophercloud.ServiceClient , id , status string ) ( * replicas. Replica , error ) {
74
+ func waitForReplicaStatus (t * testing.T , c * gophercloud.ServiceClient , id , status string ) error {
75
75
var current * replicas.Replica
76
76
77
77
err := tools .WaitFor (func (ctx context.Context ) (bool , error ) {
@@ -104,14 +104,14 @@ func waitForReplicaStatus(t *testing.T, c *gophercloud.ServiceClient, id, status
104
104
if err != nil {
105
105
mErr := PrintMessages (t , c , id )
106
106
if mErr != nil {
107
- return current , fmt .Errorf ("Replica status is '%s' and unable to get manila messages: %s" , err , mErr )
107
+ return fmt .Errorf ("Replica status is '%s' and unable to get manila messages: %s" , err , mErr )
108
108
}
109
109
}
110
110
111
- return current , err
111
+ return err
112
112
}
113
113
114
- func waitForReplicaState (t * testing.T , c * gophercloud.ServiceClient , id , state string ) ( * replicas. Replica , error ) {
114
+ func waitForReplicaState (t * testing.T , c * gophercloud.ServiceClient , id , state string ) error {
115
115
var current * replicas.Replica
116
116
117
117
err := tools .WaitFor (func (ctx context.Context ) (bool , error ) {
@@ -136,9 +136,9 @@ func waitForReplicaState(t *testing.T, c *gophercloud.ServiceClient, id, state s
136
136
if err != nil {
137
137
mErr := PrintMessages (t , c , id )
138
138
if mErr != nil {
139
- return current , fmt .Errorf ("Replica state is '%s' and unable to get manila messages: %s" , err , mErr )
139
+ return fmt .Errorf ("Replica state is '%s' and unable to get manila messages: %s" , err , mErr )
140
140
}
141
141
}
142
142
143
- return current , err
143
+ return err
144
144
}
0 commit comments