@@ -122,7 +122,10 @@ func connectExtnet(ctx context.Context, t *testing.T, profile string) {
122
122
if PodmanDriver () {
123
123
bin = "podman"
124
124
}
125
- extnetIPv4 , extnetIPv6 , _ = oci .ContainerIPs (bin , profile , extnetNetworkName )
125
+ extnetIPv4 , extnetIPv6 , err = oci .ContainerIPs (bin , profile , extnetNetworkName )
126
+ if err != nil {
127
+ t .Fatalf ("failed to execute oci.ContainerIPs, error: %v" , err )
128
+ }
126
129
t .Logf ("cluster %s was attached to network %s with address %s/%s" , profile , extnetNetworkName , extnetIPv4 , extnetIPv6 )
127
130
}
128
131
}
@@ -154,7 +157,10 @@ func multinetworkValidateFreshStart(ctx context.Context, t *testing.T, profile s
154
157
if PodmanDriver () {
155
158
bin = "podman"
156
159
}
157
- clusterIPv4 , clusterIPv6 , _ = oci .ContainerIPs (bin , profile , profile )
160
+ clusterIPv4 , clusterIPv6 , err = oci .ContainerIPs (bin , profile , profile )
161
+ if err != nil {
162
+ t .Fatalf ("failed to execute oci.ContainerIPs, error: %v" , err )
163
+ }
158
164
t .Logf ("cluster %s started with address %s/%s" , profile , clusterIPv4 , clusterIPv6 )
159
165
}
160
166
}
@@ -185,14 +191,20 @@ func multinetworkValidateStart(ctx context.Context, t *testing.T, profile string
185
191
if PodmanDriver () {
186
192
bin = "podman"
187
193
}
188
- ipv4 , ipv6 , _ := oci .ContainerIPs (bin , profile , profile )
194
+ ipv4 , ipv6 , err := oci .ContainerIPs (bin , profile , profile )
195
+ if err != nil {
196
+ t .Fatalf ("failed to execute oci.ContainerIPs, error: %v" , err )
197
+ }
189
198
if ipv4 != clusterIPv4 {
190
199
t .Fatalf ("clusterIPv4 mismatch %s != %s" , clusterIPv4 , ipv4 )
191
200
}
192
201
if ipv6 != clusterIPv6 {
193
202
t .Fatalf ("clusterIPv6 mismatch %s != %s" , clusterIPv6 , ipv6 )
194
203
}
195
- ipv4 , ipv6 , _ = oci .ContainerIPs (bin , profile , extnetNetworkName )
204
+ ipv4 , ipv6 , err = oci .ContainerIPs (bin , profile , extnetNetworkName )
205
+ if err != nil {
206
+ t .Fatalf ("failed to execute oci.ContainerIPs, error: %v" , err )
207
+ }
196
208
if ipv4 != extnetIPv4 {
197
209
t .Fatalf ("extnetIPv4 mismatch %s != %s" , extnetIPv4 , ipv4 )
198
210
}
@@ -291,5 +303,8 @@ func CleanupExtnet(t *testing.T) {
291
303
cmd := exec .CommandContext (ctx , "docker" , "network" , "rm" , extnetNetworkName )
292
304
rr := & RunResult {Args : cmd .Args }
293
305
t .Logf ("(dbg) Run: %v" , rr .Command ())
294
- _ = cmd .Run ()
306
+ err := cmd .Run ()
307
+ if err != nil {
308
+ t .Logf ("failed to run docker network rm %v" , err )
309
+ }
295
310
}
0 commit comments