chore(ci): clean up databases after test finishes in CI (#12702)

This commit is contained in:
Cian Johnston
2024-03-21 14:53:16 +00:00
committed by GitHub
parent 9c84fb7fb1
commit 5454f4997b
13 changed files with 49 additions and 39 deletions
+1 -2
View File
@@ -14,7 +14,6 @@ import (
"github.com/coder/coder/v2/coderd/database"
"github.com/coder/coder/v2/coderd/database/dbgen"
"github.com/coder/coder/v2/coderd/database/dbtestutil"
"github.com/coder/coder/v2/coderd/database/postgres"
"github.com/coder/coder/v2/enterprise/dbcrypt"
"github.com/coder/coder/v2/pty/ptytest"
"github.com/coder/coder/v2/testutil"
@@ -33,7 +32,7 @@ func TestServerDBCrypt(t *testing.T) {
t.Cleanup(cancel)
// Setup a postgres database.
connectionURL, closePg, err := postgres.Open()
connectionURL, closePg, err := dbtestutil.Open()
require.NoError(t, err)
t.Cleanup(closePg)
t.Cleanup(func() { dbtestutil.DumpOnFailure(t, connectionURL) })