We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent3bfd4d6 commit7fc8eadCopy full SHA for 7fc8ead
coderd/database/databasefake/generator.go
@@ -140,6 +140,7 @@ func (g *Generator) User(ctx context.Context, seed database.User) database.User
140
// Populate uses `require` which calls `t.FailNow()` and must be called from the
141
// go routine running the test or benchmark function.
142
func (g*Generator)Populate(ctx context.Context,seedmap[string]interface{})map[string]interface{} {
143
+g.testT.Helper()
144
db:=g.db
145
t:=g.testT
146
@@ -346,7 +347,8 @@ func (g *Generator) Populate(ctx context.Context, seed map[string]interface{}) m
346
347
348
output[name]=link
349
default:
-panic(fmt.Sprintf("unknown type %T",orig))
350
+// If you hit this, just add your type to the switch.
351
+t.Fatalf("unknown type '%T' used in fake data generator",orig)
352
}
353
354
returnoutput