summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2014-11-12 09:22:29 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2014-11-12 09:22:29 (GMT)
commit0a8d5fdb52f479e4526ca7ee2ddfd0df2a202928 (patch) (side-by-side diff)
tree475d3545113ba17984e54e4d5fd1257519fd5302
parent2862e10791592ce9ce5f6b4d66c68798c74e19da (diff)
downloadvmod-dbrw-0a8d5fdb52f479e4526ca7ee2ddfd0df2a202928.tar.gz
vmod-dbrw-0a8d5fdb52f479e4526ca7ee2ddfd0df2a202928.tar.bz2
Update docs. Rename DBRW_TEST_NAME to DBRW_TEST_DATABASE.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--README61
-rw-r--r--configure.ac2
-rw-r--r--tests/atlocal.in6
3 files changed, 64 insertions, 5 deletions
diff --git a/README b/README
index 4c22ea4..68fbe04 100644
--- a/README
+++ b/README
@@ -114,7 +114,66 @@ Once configured, do
This will build the module. Finally, do the following command as root:
make install
-
+
+* Testing
+
+Testing the module requires access to an SQL database which will be
+populated with the test data. You can either create the database
+and SQL user, or just an SQL user and give him rights for creating it.
+For example:
+
+ GRANT ALL PRIVILEGES on dbrw_test.* to dbrw_test@localhost;
+
+Once done, supply the SQL credentials and the database name with
+extra arguments to configure, as shown in the example below:
+
+ ./configure --with-varnish-source=/usr/src/varnish-3.0.1\
+ DBRW_TEST_DATABASE=dbrw_test\
+ DBRW_TEST_USER=dbrw_test
+
+You can use the following variables:
+
+** DBRW_TEST_DATABASE
+
+Name of the test database. This one must be supplied in order to
+enable the tests.
+
+** DBRW_TEST_DEBUG
+
+Debugging level to use during the test. If greater than 0, debugging
+info will be logged via syslog channel daemon.debug.
+
+** DBRW_TEST_DBTYPE
+
+Type of the database to use. Either mysql or pgsql. By default,
+mysql is used, if enabled.
+
+** DBRW_TEST_PARAMS
+
+Any additional parameters. These must be in the format understood
+by dbrw.config function (see vmod_dbrw(3)).
+
+** DBRW_TEST_SERVER
+
+Name or IP address of SQL server. Defaults to localhost.
+
+** DBRW_TEST_USER
+
+Database user.
+
+** DBRW_TEST_PASS
+
+Password to connect to the server (if necessary).
+
+After running make, do
+
+ make check
+
+to run the tests. Ideally, they should succeed. The tests will be skipped
+if the supplied credentials are insufficient to access the SQL server.
+If they fail, the file testsuite.log will contain detailed logs.
+Additional information can then be found in the directory testsuite.dir.
+
* Bug reporting
Send bug reports and suggestions to <gray@gnu.org>
diff --git a/configure.ac b/configure.ac
index 88ebc51..db494c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,7 +204,7 @@ else
fi
AC_ARG_VAR([DBRW_TEST_PARAMS], [SQL connection parameters for testing])
AC_ARG_VAR([DBRW_TEST_SERVER], [Test SQL server])
-AC_ARG_VAR([DBRW_TEST_NAME], [Test SQL database])
+AC_ARG_VAR([DBRW_TEST_DATABASE], [Test SQL database])
AC_ARG_VAR([DBRW_TEST_USER], [Test SQL user])
AC_ARG_VAR([DBRW_TEST_PASS], [Test SQL password])
AC_ARG_VAR([DBRW_TEST_DEBUG], [Debug settings for testing])
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 057b132..2e3922f 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -10,7 +10,7 @@ VARNISHVERSION=@VARNISHVERSION@
: ${DBRW_TEST_DBTYPE=@DBRW_TEST_DBTYPE@}
: ${DBRW_TEST_PARAMS=@DBRW_TEST_PARAMS@}
: ${DBRW_TEST_SERVER=@DBRW_TEST_SERVER@}
-: ${DBRW_TEST_NAME=@DBRW_TEST_NAME@}
+: ${DBRW_TEST_DATABASE=@DBRW_TEST_DATABASE@}
: ${DBRW_TEST_USER=@DBRW_TEST_USER@}
: ${DBRW_TEST_PASS=@DBRW_TEST_PASS@}
: ${DBRW_TEST_DEBUG=@DBRW_TEST_DEBUG@}
@@ -18,8 +18,8 @@ VARNISHVERSION=@VARNISHVERSION@
if [ -n "$DBRW_TEST_SERVER" ]; then
DBRW_TEST_PARAMS="$DBRW_TEST_PARAMS;server=$DBRW_TEST_SERVER"
fi
-if [ -n "$DBRW_TEST_NAME" ]; then
- DBRW_TEST_PARAMS="$DBRW_TEST_PARAMS;database=$DBRW_TEST_NAME"
+if [ -n "$DBRW_TEST_DATABASE" ]; then
+ DBRW_TEST_PARAMS="$DBRW_TEST_PARAMS;database=$DBRW_TEST_DATABASE"
fi
if [ -n "$DBRW_TEST_USER" ]; then
DBRW_TEST_PARAMS="$DBRW_TEST_PARAMS;user=$DBRW_TEST_USER"

Return to:

Send suggestions and report system problems to the System administrator.