mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: remove references to dbtestutil.WillUsePostgres (#20436)
Addresses https://github.com/coder/internal/issues/758. This PR only cleans up dead code, it makes no changes to test logic.
This commit is contained in:
@@ -430,24 +430,6 @@ func (m *expects) Errors(err error) *expects {
|
||||
return m
|
||||
}
|
||||
|
||||
// ErrorsWithPG is optional. If it is never called, it will not be asserted.
|
||||
// It will only be asserted if the test is running with a Postgres database.
|
||||
func (m *expects) ErrorsWithPG(err error) *expects {
|
||||
if dbtestutil.WillUsePostgres() {
|
||||
return m.Errors(err)
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
// ErrorsWithInMemDB is optional. If it is never called, it will not be asserted.
|
||||
// It will only be asserted if the test is running with an in-memory database.
|
||||
func (m *expects) ErrorsWithInMemDB(err error) *expects {
|
||||
if !dbtestutil.WillUsePostgres() {
|
||||
return m.Errors(err)
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
func (m *expects) FailSystemObjectChecks() *expects {
|
||||
return m.WithSuccessAuthorizer(func(ctx context.Context, subject rbac.Subject, action policy.Action, obj rbac.Object) error {
|
||||
if obj.Type == rbac.ResourceSystem.Type {
|
||||
|
||||
Reference in New Issue
Block a user