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:
Kynan Ware 2025-09-02 13:14:37 -06:00
parent c4c0ddc8c2
commit c5f7be9adb

View file

@ -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
},