Skip to content

Commit 216d74c

Browse files
committed
Updated README to describe running tests.
1 parent 0a276bc commit 216d74c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ Here's the gist of how tests work:
2222

2323
Dive in and look at the tests, or [read the blog post for more detail](http://nerdyc.com/blog/2016/06/16/testing-web-apps-end-to-end-in-go/).
2424

25+
## Running the Tests
26+
27+
Tests are run via `go test`, just like any other Go project. However, the tests require a PostgreSQL database. The database URL is passed in via the `DATABASE_URL` environment variable, like this:
28+
29+
```bash
30+
DATABASE_URL="postgres://username@localhost:5432/service_test?sslmode=disable" go test
31+
```
32+
2533
## Contact Me!
2634

2735
I'd love to know if this helps you! I'm [@nerdyc](https://twitter.com/nerdyc) on Twitter.

0 commit comments

Comments
 (0)