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 8
8
"golang.org/x/xerrors"
9
9
10
10
"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 "
12
12
"github.com/coder/coder/v2/enterprise/audit"
13
13
"github.com/coder/coder/v2/enterprise/audit/audittest"
14
14
)
@@ -86,11 +86,12 @@ func TestAuditor(t *testing.T) {
86
86
for _ , test := range tests {
87
87
t .Run (test .name , func (t * testing.T ) {
88
88
t .Parallel ()
89
+ db , _ := dbtestutil .NewDB (t )
89
90
90
91
var (
91
92
backend = & testBackend {decision : test .backendDecision , err : test .backendError }
92
93
exporter = audit .NewAuditor (
93
- dbmem . New () ,
94
+ db ,
94
95
audit .FilterFunc (func (_ context.Context , _ database.AuditLog ) (audit.FilterDecision , error ) {
95
96
return test .filterDecision , test .filterError
96
97
}),
Original file line number Diff line number Diff line change 7
7
"github.com/stretchr/testify/require"
8
8
9
9
"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 "
11
11
"github.com/coder/coder/v2/enterprise/audit"
12
12
"github.com/coder/coder/v2/enterprise/audit/audittest"
13
13
"github.com/coder/coder/v2/enterprise/audit/backends"
@@ -20,7 +20,7 @@ func TestPostgresBackend(t *testing.T) {
20
20
21
21
var (
22
22
ctx , cancel = context .WithCancel (context .Background ())
23
- db = dbmem . New ( )
23
+ db , _ = dbtestutil . NewDB ( t )
24
24
pgb = backends .NewPostgres (db , true )
25
25
alog = audittest .RandomLog ()
26
26
)
You can’t perform that action at this time.
0 commit comments