Skip to content

Commit

Permalink
Remove unnecessary privilege grant when creating a test database
Browse files Browse the repository at this point in the history
  • Loading branch information
tygern committed May 6, 2024
1 parent c6b29f2 commit 2441632
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/testsupport/test_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ type TestDb struct {
func NewTestDb(t *testing.T) *TestDb {
testDbName := fmt.Sprintf("starter_test_%d", rand.IntN(1_000_000))
withSuperDb(t, func(superDb *sql.DB) {

_, err := superDb.Exec(fmt.Sprintf("create database %s template starter_test", testDbName))
assert.NoError(t, err, "unable to create test database")
_, err = superDb.Exec(fmt.Sprintf("grant all privileges on database %s to starter", testDbName))
assert.NoError(t, err, "unable to grant permissions for test database")
})

return &TestDb{
Expand Down

0 comments on commit 2441632

Please sign in to comment.