Return url of test database (#48)
It is helpful to connect to a database when tests have failed.
This commit is contained in:
1 parent
7d8661be31
commit
8d7f24268c
7 files changed
+25
-25
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user