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:
phamnazage-jpg
2026-06-02 06:56:30 +08:00
parent 21065735dd
commit 08f7db1bc2
2 changed files with 4 additions and 2 deletions

View File

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

View File

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