Skip to content

Commit

Permalink
vendor,testing: bump cockroach-go
Browse files Browse the repository at this point in the history
Picks up cockroachdb/cockroach-go#81. Cleans up
test code along the way to work with latest cockroach-go
(testserver.NewTestServer already starts the server it seems, there's no
need to start it again).
  • Loading branch information
irfansharif committed Jul 14, 2020
1 parent 3e59c59 commit 8dd4206
Show file tree
Hide file tree
Showing 16 changed files with 276 additions and 88 deletions.
6 changes: 3 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@
[[constraint]]
name = "github.com/julienschmidt/httprouter"
version = "1.1.0"

[[constraint]]
name = "github.com/cockroachdb/cockroach-go"
version = "2.0.3"
12 changes: 5 additions & 7 deletions testing/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ import (
"testing"
"time"

"github.com/cockroachdb/examples-orms/version"

"github.com/cockroachdb/cockroach-go/testserver"
"github.com/cockroachdb/examples-orms/version"
// Import postgres driver.
_ "github.com/lib/pq"
)
Expand Down Expand Up @@ -69,11 +68,10 @@ func newTenant(t *testing.T, ts testserver.TestServer) testserver.TestServer {
}

// startServerWithApplication launches a test database as a subprocess.
func startServerWithApplication(t *testing.T, ts testserver.TestServer, app application) (*sql.DB, *url.URL, func()) {
func startServerWithApplication(
t *testing.T, ts testserver.TestServer, app application,
) (*sql.DB, *url.URL, func()) {
t.Helper()
if err := ts.Start(); err != nil {
t.Fatal(err)
}
serverURL := ts.PGURL()
if serverURL == nil {
t.Fatal("url not found")
Expand All @@ -84,7 +82,7 @@ func startServerWithApplication(t *testing.T, ts testserver.TestServer, app appl
if err != nil {
t.Fatal(err)
}
if err := ts.WaitForInit(db); err != nil {
if err := ts.WaitForInit(); err != nil {
t.Fatal(err)
}
// Create the database if it does not exist.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions vendor/github.com/cockroachdb/cockroach-go/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8dd4206

Please sign in to comment.