test: M-01 替换测试代码中的 panic 为 t.Fatal
- packs_repo_test.go: panic → t.Fatal - providers_repo_test.go: panic → t.Fatal
This commit is contained in:
@@ -205,7 +205,8 @@ func TestPacksRepoUpsertReturnsExecError(t *testing.T) {
|
||||
return nil, errors.New("unexpected query")
|
||||
},
|
||||
queryRowFn: func(context.Context, string, ...any) *sql.Row {
|
||||
panic("unexpected QueryRowContext")
|
||||
t.Fatal("unexpected QueryRowContext call")
|
||||
return nil
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -313,7 +313,8 @@ func TestProvidersRepoUpsertReturnsExecError(t *testing.T) {
|
||||
return nil, errors.New("unexpected query")
|
||||
},
|
||||
queryRowFn: func(context.Context, string, ...any) *sql.Row {
|
||||
panic("unexpected QueryRowContext")
|
||||
t.Fatal("unexpected QueryRowContext call")
|
||||
return nil
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user