Replace panic with require.FailNow in test
Updated the test to use require.FailNow instead of panic when CapiClient is called with --web, improving test failure reporting and consistency.
This commit is contained in:
parent
c4c0ddc8c2
commit
c5f7be9adb
1 changed files with 1 additions and 1 deletions
|
|
@ -231,7 +231,7 @@ func Test_listRun(t *testing.T) {
|
|||
Browser: br,
|
||||
CapiClient: func() (*capi.CAPIClient, error) {
|
||||
if tt.web {
|
||||
panic("CapiClient should not be invoked when --web is set")
|
||||
require.FailNow(t, "CapiClient was called with --web")
|
||||
}
|
||||
return capiClient, nil
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue