File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 88 "golang.org/x/xerrors"
99
1010 "github.com/coder/coder/v2/coderd/database"
11- "github.com/coder/coder/v2/coderd/database/dbmem "
11+ "github.com/coder/coder/v2/coderd/database/dbtestutil "
1212 "github.com/coder/coder/v2/enterprise/audit"
1313 "github.com/coder/coder/v2/enterprise/audit/audittest"
1414)
@@ -86,11 +86,12 @@ func TestAuditor(t *testing.T) {
8686 for _ , test := range tests {
8787 t .Run (test .name , func (t * testing.T ) {
8888 t .Parallel ()
89+ db , _ := dbtestutil .NewDB (t )
8990
9091 var (
9192 backend = & testBackend {decision : test .backendDecision , err : test .backendError }
9293 exporter = audit .NewAuditor (
93- dbmem . New () ,
94+ db ,
9495 audit .FilterFunc (func (_ context.Context , _ database.AuditLog ) (audit.FilterDecision , error ) {
9596 return test .filterDecision , test .filterError
9697 }),
Original file line number Diff line number Diff line change 77 "github.com/stretchr/testify/require"
88
99 "github.com/coder/coder/v2/coderd/database"
10- "github.com/coder/coder/v2/coderd/database/dbmem "
10+ "github.com/coder/coder/v2/coderd/database/dbtestutil "
1111 "github.com/coder/coder/v2/enterprise/audit"
1212 "github.com/coder/coder/v2/enterprise/audit/audittest"
1313 "github.com/coder/coder/v2/enterprise/audit/backends"
@@ -20,7 +20,7 @@ func TestPostgresBackend(t *testing.T) {
2020
2121 var (
2222 ctx , cancel = context .WithCancel (context .Background ())
23- db = dbmem . New ( )
23+ db , _ = dbtestutil . NewDB ( t )
2424 pgb = backends .NewPostgres (db , true )
2525 alog = audittest .RandomLog ()
2626 )
You can’t perform that action at this time.
0 commit comments