mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
fix: fail the capabilities benchmark on a nil response instead of panicking
benchCapabilities read resp.Capabilities after checking only err, so a provider returning (nil, nil) panicked the benchmark rather than failing it.
This commit is contained in:
@@ -181,5 +181,8 @@ func benchCapabilities(b *testing.B, provider ebsprovider.EBSProvider) ebsprovid
|
||||
if err != nil {
|
||||
b.Fatalf("get capabilities: %v", err)
|
||||
}
|
||||
if resp == nil {
|
||||
b.Fatal("get capabilities: provider returned a nil response with a nil error")
|
||||
}
|
||||
return resp.Capabilities
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user