]> granicus.if.org Git - pgbouncer/commitdiff
Add documentation for available test suites
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 19 Jun 2019 15:19:28 +0000 (17:19 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 19 Jun 2019 15:19:28 +0000 (17:19 +0200)
fixes #83

test/README.md [new file with mode: 0644]

diff --git a/test/README.md b/test/README.md
new file mode 100644 (file)
index 0000000..b3ef30b
--- /dev/null
@@ -0,0 +1,39 @@
+Tests
+=====
+
+Various ways to test PgBouncer:
+
+- `test.sh`
+
+    General test of basic functionality and different configuration
+    parameters including timeouts, pool size, online restart,
+    pause/resume, etc.  To invoke, just run `./test.sh`.  This needs
+    PostgreSQL server programs (`initdb`, `pg_ctl`) in the path, so if
+    you are on a system that doesn't have those in the normal path
+    (e.g., Debian, Ubuntu), set `PATH` beforehand.
+
+    Note: This test suite will ask for `sudo` access to use
+    `iptables`/`pfctl` to simulate various network conditions.  If you
+    don't want that, just enter an empty password at the `sudo`
+    prompt, and those tests will be skipped.  Check the source if
+    there are any doubts.
+
+- `ssl/test.sh`
+
+    Tests SSL/TLS functionality.  Otherwise very similar to `test.sh`.
+
+- `hba_test`
+
+    Tests hba parsing.  Run `make all` to build and `make check` to execute.
+
+- `run-conntest.sh`
+
+    This is a more complex setup that continuously runs queries
+    through PgBouncer while messing around with the network, checking
+    whether PgBouncer correctly reconnects and all the queries get
+    processed.  First, run `make asynctest` to build, then see
+    `run-conntest.sh` how to run the different pieces.
+
+- `stress.py`
+
+    Stress test, see source for details.  Requires Python and `psycopg2` module.