-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc.go
More file actions
25 lines (20 loc) · 795 Bytes
/
doc.go
File metadata and controls
25 lines (20 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
Package dbtest provides a way of starting a MongoDB or Postgres docker
container prior to running the integration test suite.
This packages manages the life cycle of the of this docker container
it fires off the container, kill the container and remove its volume
after the test suite is completed.
Here is an example on how to run these supported db containers:
import (
"github.com/akhettar/docker-db"
)
func main() {
// Starting Postgres container with an initialised schema file
con1 := dbtest.StartPostgresContainerWithInitialisationScript("dbname", "schema.sql")
fmt.Printf("mongo container with id running %s", con1.id)
// Staring mongo container
con2 := dbtest.StartMongoContainer()
fmt.Printf("mongo container with id running %s", con2.id)
}
*/
package dbtest