(t testing.TB, db database.Store, seed database.BoundaryLog)
| 467 | } |
| 468 | |
| 469 | func BoundaryLog(t testing.TB, db database.Store, seed database.BoundaryLog) database.BoundaryLog { |
| 470 | log, err := db.InsertBoundaryLog(genCtx, database.InsertBoundaryLogParams{ |
| 471 | ID: takeFirst(seed.ID, uuid.New()), |
| 472 | SessionID: seed.SessionID, |
| 473 | SequenceNumber: takeFirst(seed.SequenceNumber, 0), |
| 474 | CapturedAt: takeFirst(seed.CapturedAt, dbtime.Now()), |
| 475 | CreatedAt: takeFirst(seed.CreatedAt, dbtime.Now()), |
| 476 | Proto: takeFirst(seed.Proto, "http"), |
| 477 | Method: takeFirst(seed.Method, "GET"), |
| 478 | Detail: takeFirst(seed.Detail, "https://example.com"), |
| 479 | MatchedRule: seed.MatchedRule, |
| 480 | }) |
| 481 | require.NoError(t, err, "insert boundary log") |
| 482 | return log |
| 483 | } |
| 484 | |
| 485 | func Template(t testing.TB, db database.Store, seed database.Template) database.Template { |
| 486 | id := takeFirst(seed.ID, uuid.New()) |
nothing calls this directly
no test coverage detected