mirror of
https://github.com/coder/coder.git
synced 2026-10-29 17:44:33 +08:00
chore: convert dbauthz tests to also run with Postgres (#15862)
Another PR to address https://github.com/coder/coder/issues/15109. - adds the DisableForeignKeysAndTriggers utility, which simplifies converting tests from in-mem to postgres - converts the dbauthz test suite to pass on both the in-mem db and Postgres
This commit is contained in:
@@ -413,6 +413,13 @@ func (m queryMetricsStore) DeleteWorkspaceAgentPortSharesByTemplate(ctx context.
|
||||
return r0
|
||||
}
|
||||
|
||||
func (m queryMetricsStore) DisableForeignKeysAndTriggers(ctx context.Context) error {
|
||||
start := time.Now()
|
||||
r0 := m.s.DisableForeignKeysAndTriggers(ctx)
|
||||
m.queryLatencies.WithLabelValues("DisableForeignKeysAndTriggers").Observe(time.Since(start).Seconds())
|
||||
return r0
|
||||
}
|
||||
|
||||
func (m queryMetricsStore) EnqueueNotificationMessage(ctx context.Context, arg database.EnqueueNotificationMessageParams) error {
|
||||
start := time.Now()
|
||||
r0 := m.s.EnqueueNotificationMessage(ctx, arg)
|
||||
|
||||
Reference in New Issue
Block a user