Skip to content

Commit

Permalink
fix: only use recommended settings in root user tests
Browse files Browse the repository at this point in the history
  • Loading branch information
martskins committed Oct 30, 2024
1 parent f7dc17f commit 88ab497
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/cockroachdb/cockroachdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestCockroach_NotRoot(t *testing.T) {
url: "postgres://test@localhost:xxxxx/defaultdb?sslmode=disable",
opts: []testcontainers.ContainerCustomizer{
cockroachdb.WithUser("test"),
cockroachdb.WithStatements(),
},
})
}
Expand All @@ -38,6 +39,7 @@ func TestCockroach_Password(t *testing.T) {
opts: []testcontainers.ContainerCustomizer{
cockroachdb.WithUser("foo"),
cockroachdb.WithPassword("bar"),
cockroachdb.WithStatements(),
},
})
}
Expand Down
1 change: 1 addition & 0 deletions modules/cockroachdb/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func WithTLS(cfg *TLSConfig) Option {
}

// DefaultStatements are the settings recommended by Cockroach Labs for testing clusters.
// Note that to use these defaults the user needs to have MODIFYCLUSTERSETTING privilege.
// See https://www.cockroachlabs.com/docs/stable/local-testing for more information.
var DefaultStatements = []string{
"SET CLUSTER SETTING kv.range_merge.queue_interval = '50ms'",
Expand Down

0 comments on commit 88ab497

Please sign in to comment.