Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartPostgresAndMigrate ¶
func StartPostgresAndMigrate() (*sqlx.DB, *dockertest.Pool, *dockertest.Resource)
Example ¶
package main import ( "fmt" "github.com/rsachdeva/illuminatingdeposits-rest/testserver" "github.com/rsachdeva/illuminatingdeposits-rest/tools/dbcli/schema" ) func main() { db, pool, resource := testserver.StartPostgresAndMigrate() // this is just for this test to make sure can populate db; we don't require this for tests in general err := schema.Seed(db) if err != nil { fmt.Println("Cound not seed test database") } err = pool.Purge(resource) fmt.Println("ExamplePostgresConnect err is", err) }
Output: ExamplePostgresConnect err is <nil>
Types ¶
type ClientResult ¶
func InitRestHttpTLS ¶
func InitRestHttpTLS(t *testing.T, allowPurge bool) ClientResult
Click to show internal directories.
Click to hide internal directories.