You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This creates an example postgres instance using docker.
4
+
5
+
Check out [test/terraform_database_example_test.go](/test/terraform_database_example_test.go) to see how you can write automated tests for database. In order to make go test code work, you need to provide host, port, username, password and database name of a existing database, which you have already created on cloud platform or using docker before testing. Only Microsoft SQL Server, PostgreSQL and MySQL are supported.
6
+
7
+
## Running this module manually
8
+
9
+
1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH`.
10
+
2. Run `terraform init`.
11
+
3. Run `terraform apply`.
12
+
4. When you're done, run `terraform destroy`.
13
+
14
+
## Running automated tests against this module
15
+
16
+
1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH`.
17
+
2. Install [Golang](https://golang.org/) and make sure this code is checked out into your `GOPATH`.
18
+
3.`go mod tidy`
19
+
4.`go test -v test/terraform_database_example_test.go`
0 commit comments