Skip to content

Commit

Permalink
testserver: no longer rely on auto-init
Browse files Browse the repository at this point in the history
`cockroach start` without `--join` is deprecated behavior, and something
we're looking to get rid of in cockroachdb/cockroach#51245.
  • Loading branch information
irfansharif committed Jul 10, 2020
1 parent 55eba90 commit 92e6ea9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions testserver/testserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ func NewDBForTest(t *testing.T, opts ...testServerOpt) (*sql.DB, func()) {
// specified, the returned connection will explicitly connect to
// it. Returns a sql *DB instance a shutdown function. The caller is
// responsible for executing the returned shutdown function on exit.
func NewDBForTestWithDatabase(t *testing.T, database string, opts ...testServerOpt) (*sql.DB, func()) {
func NewDBForTestWithDatabase(
t *testing.T, database string, opts ...testServerOpt,
) (*sql.DB, func()) {
t.Helper()
ts, err := NewTestServer(opts...)
if err != nil {
Expand Down Expand Up @@ -252,7 +254,7 @@ func NewTestServer(opts ...testServerOpt) (TestServer, error) {

args := []string{
cockroachBinary,
"start",
"start-single-node",
"--logtostderr",
secureOpt,
"--host=localhost",
Expand Down

0 comments on commit 92e6ea9

Please sign in to comment.