diff --git a/pgtest.go b/pgtest.go index 903a12c..c16d298 100644 --- a/pgtest.go +++ b/pgtest.go @@ -29,6 +29,8 @@ type PG struct { User string Name string + DSN string + persistent bool stderr io.ReadCloser @@ -224,6 +226,7 @@ func start(config *PGConfig) (*PG, error) { Host: sockDir, User: pgUser(isRoot), Name: "test", + DSN: dsn, persistent: config.IsPersistent, diff --git a/pgtest_test.go b/pgtest_test.go index 11c89b9..b843ade 100644 --- a/pgtest_test.go +++ b/pgtest_test.go @@ -37,6 +37,7 @@ func TestPostgreSQLWithConfig(t *testing.T) { assert.NotEmpty(pg.Host) assert.NotEmpty(pg.Name) + assert.NotEmpty(pg.DSN) err = pg.Stop() assert.NoError(err)