MCPcopy Index your code
hub / github.com/coder/coder / TestAuditLogCount

Function TestAuditLogCount

coderd/database/querier_test.go:2594–2612  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2592}
2593
2594func TestAuditLogCount(t *testing.T) {
2595 t.Parallel()
2596 if testing.Short() {
2597 t.SkipNow()
2598 }
2599
2600 sqlDB := testSQLDB(t)
2601 err := migrations.Up(sqlDB)
2602 require.NoError(t, err)
2603 db := database.New(sqlDB)
2604
2605 ctx := testutil.Context(t, testutil.WaitLong)
2606
2607 dbgen.AuditLog(t, db, database.AuditLog{})
2608
2609 count, err := db.CountAuditLogs(ctx, database.CountAuditLogsParams{})
2610 require.NoError(t, err)
2611 require.Equal(t, int64(1), count)
2612}
2613
2614func TestWorkspaceQuotas(t *testing.T) {
2615 t.Parallel()

Callers

nothing calls this directly

Calls 8

UpFunction · 0.92
NewFunction · 0.92
ContextFunction · 0.92
AuditLogFunction · 0.92
SkipNowMethod · 0.80
testSQLDBFunction · 0.70
CountAuditLogsMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected