aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/lib/pq/TESTS.md
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2023-12-30 16:00:20 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2023-12-30 16:00:20 -0500
commit809fc4639e58ca9ca082ce68b5c62b463b2f1e1d (patch)
tree1cb7b9951a80509b827b8e5bd1eb2dd09e87aec1 /vendor/github.com/lib/pq/TESTS.md
parentInitial Commit (diff)
downloadcli-809fc4639e58ca9ca082ce68b5c62b463b2f1e1d.zip
Add initial code
Diffstat (limited to 'vendor/github.com/lib/pq/TESTS.md')
-rw-r--r--vendor/github.com/lib/pq/TESTS.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/vendor/github.com/lib/pq/TESTS.md b/vendor/github.com/lib/pq/TESTS.md
new file mode 100644
index 0000000..f050211
--- /dev/null
+++ b/vendor/github.com/lib/pq/TESTS.md
@@ -0,0 +1,33 @@
+# Tests
+
+## Running Tests
+
+`go test` is used for testing. A running PostgreSQL
+server is required, with the ability to log in. The
+database to connect to test with is "pqgotest," on
+"localhost" but these can be overridden using [environment
+variables](https://www.postgresql.org/docs/9.3/static/libpq-envars.html).
+
+Example:
+
+ PGHOST=/run/postgresql go test
+
+## Benchmarks
+
+A benchmark suite can be run as part of the tests:
+
+ go test -bench .
+
+## Example setup (Docker)
+
+Run a postgres container:
+
+```
+docker run --expose 5432:5432 postgres
+```
+
+Run tests:
+
+```
+PGHOST=localhost PGPORT=5432 PGUSER=postgres PGSSLMODE=disable PGDATABASE=postgres go test
+```