Return url of test database (#48)

It is helpful to connect to a database when tests have failed.
This commit is contained in:
Michael Gaffney authored and GitHub committed 2020-05-12 15:49:37 -04:00
1 parent 7d8661be31
commit 8d7f24268c
7 files changed
+25 -25

No files matched your search

+2 -2
View File
@@ -12,7 +12,7 @@ import (
)
// setup the tests (initialize the database one-time and intialized testDatabaseURL)
func TestSetup(t *testing.T, dialect string) (func() error, *gorm.DB) {
func TestSetup(t *testing.T, dialect string) (func() error, *gorm.DB, string) {
cleanup := func() error { return nil }
var url string
var err error
@@ -24,7 +24,7 @@ func TestSetup(t *testing.T, dialect string) (func() error, *gorm.DB) {
if err != nil {
t.Fatal(err)
}
return cleanup, db
return cleanup, db, url
}
// TestWrapper initializes an AEAD wrapping.Wrapper for testing the oplog