Skip to content

Commit

Permalink
Merge pull request #81 from irfansharif/200709.use-start-single-node
Browse files Browse the repository at this point in the history
testserver: no longer rely on auto-init
  • Loading branch information
irfansharif authored Jul 10, 2020
2 parents 55eba90 + 92e6ea9 commit b7c8285
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 b7c8285

Please sign in to comment.