authzSetup returns a raw DB for seeding and an RBAC-wrapped DB that enforces real authorization checks.
(t *testing.T)
| 26 | // authzSetup returns a raw DB for seeding and an RBAC-wrapped DB |
| 27 | // that enforces real authorization checks. |
| 28 | func authzSetup(t *testing.T) (rawDB database.Store, authzDB database.Store) { |
| 29 | t.Helper() |
| 30 | rawDB, _ = dbtestutil.NewDB(t) |
| 31 | authz := rbac.NewStrictAuthorizer(prometheus.NewRegistry()) |
| 32 | authzDB = dbauthz.New(rawDB, authz, slogtest.Make(t, nil), coderdtest.AccessControlStorePointer()) |
| 33 | return rawDB, authzDB |
| 34 | } |
| 35 | |
| 36 | func TestSeatTrackerDB(t *testing.T) { |
| 37 | t.Parallel() |
no test coverage detected