Skip to content

Commit

Permalink
fix: test db name gen
Browse files Browse the repository at this point in the history
  • Loading branch information
davenewza committed Nov 10, 2023
1 parent 97edc57 commit a8cab94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion testing/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package testing

import (
"context"
"strings"
"testing"

"github.com/dchest/uniuri"
"github.com/stretchr/testify/require"
"github.com/teamkeel/keel/db"
"github.com/teamkeel/keel/proto"
Expand Down Expand Up @@ -36,7 +38,7 @@ func MakeContext(t *testing.T, keelSchema string, resetDatabase bool) (context.C
require.NoError(t, err)

// Add database to context
database, err := testhelpers.SetupDatabaseForTestCase(ctx, dbConnInfo, schema, "keel_test", resetDatabase)
database, err := testhelpers.SetupDatabaseForTestCase(ctx, dbConnInfo, schema, "keel_test_"+strings.ToLower(uniuri.NewLen(8)), resetDatabase)
require.NoError(t, err)
ctx = db.WithDatabase(ctx, database)

Expand Down

0 comments on commit a8cab94

Please sign in to comment.