diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-11-12 11:22:29 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-11-12 11:22:29 +0200 |
commit | 0a8d5fdb52f479e4526ca7ee2ddfd0df2a202928 (patch) | |
tree | 475d3545113ba17984e54e4d5fd1257519fd5302 | |
parent | 2862e10791592ce9ce5f6b4d66c68798c74e19da (diff) | |
download | vmod-dbrw-0a8d5fdb52f479e4526ca7ee2ddfd0df2a202928.tar.gz vmod-dbrw-0a8d5fdb52f479e4526ca7ee2ddfd0df2a202928.tar.bz2 |
Update docs. Rename DBRW_TEST_NAME to DBRW_TEST_DATABASE.
-rw-r--r-- | README | 61 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | tests/atlocal.in | 6 |
3 files changed, 64 insertions, 5 deletions
@@ -114,7 +114,66 @@ Once configured, do | |||
114 | This will build the module. Finally, do the following command as root: | 114 | This will build the module. Finally, do the following command as root: |
115 | 115 | ||
116 | make install | 116 | make install |
117 | 117 | ||
118 | * Testing | ||
119 | |||
120 | Testing the module requires access to an SQL database which will be | ||
121 | populated with the test data. You can either create the database | ||
122 | and SQL user, or just an SQL user and give him rights for creating it. | ||
123 | For example: | ||
124 | |||
125 | GRANT ALL PRIVILEGES on dbrw_test.* to dbrw_test@localhost; | ||
126 | |||
127 | Once done, supply the SQL credentials and the database name with | ||
128 | extra arguments to configure, as shown in the example below: | ||
129 | |||
130 | ./configure --with-varnish-source=/usr/src/varnish-3.0.1\ | ||
131 | DBRW_TEST_DATABASE=dbrw_test\ | ||
132 | DBRW_TEST_USER=dbrw_test | ||
133 | |||
134 | You can use the following variables: | ||
135 | |||
136 | ** DBRW_TEST_DATABASE | ||
137 | |||
138 | Name of the test database. This one must be supplied in order to | ||
139 | enable the tests. | ||
140 | |||
141 | ** DBRW_TEST_DEBUG | ||
142 | |||
143 | Debugging level to use during the test. If greater than 0, debugging | ||
144 | info will be logged via syslog channel daemon.debug. | ||
145 | |||
146 | ** DBRW_TEST_DBTYPE | ||
147 | |||
148 | Type of the database to use. Either mysql or pgsql. By default, | ||
149 | mysql is used, if enabled. | ||
150 | |||
151 | ** DBRW_TEST_PARAMS | ||
152 | |||
153 | Any additional parameters. These must be in the format understood | ||
154 | by dbrw.config function (see vmod_dbrw(3)). | ||
155 | |||
156 | ** DBRW_TEST_SERVER | ||
157 | |||
158 | Name or IP address of SQL server. Defaults to localhost. | ||
159 | |||
160 | ** DBRW_TEST_USER | ||
161 | |||
162 | Database user. | ||
163 | |||
164 | ** DBRW_TEST_PASS | ||
165 | |||
166 | Password to connect to the server (if necessary). | ||
167 | |||
168 | After running make, do | ||
169 | |||
170 | make check | ||
171 | |||
172 | to run the tests. Ideally, they should succeed. The tests will be skipped | ||
173 | if the supplied credentials are insufficient to access the SQL server. | ||
174 | If they fail, the file testsuite.log will contain detailed logs. | ||
175 | Additional information can then be found in the directory testsuite.dir. | ||
176 | |||
118 | * Bug reporting | 177 | * Bug reporting |
119 | 178 | ||
120 | Send bug reports and suggestions to <gray@gnu.org> | 179 | 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 | |||
204 | fi | 204 | fi |
205 | AC_ARG_VAR([DBRW_TEST_PARAMS], [SQL connection parameters for testing]) | 205 | AC_ARG_VAR([DBRW_TEST_PARAMS], [SQL connection parameters for testing]) |
206 | AC_ARG_VAR([DBRW_TEST_SERVER], [Test SQL server]) | 206 | AC_ARG_VAR([DBRW_TEST_SERVER], [Test SQL server]) |
207 | AC_ARG_VAR([DBRW_TEST_NAME], [Test SQL database]) | 207 | AC_ARG_VAR([DBRW_TEST_DATABASE], [Test SQL database]) |
208 | AC_ARG_VAR([DBRW_TEST_USER], [Test SQL user]) | 208 | AC_ARG_VAR([DBRW_TEST_USER], [Test SQL user]) |
209 | AC_ARG_VAR([DBRW_TEST_PASS], [Test SQL password]) | 209 | AC_ARG_VAR([DBRW_TEST_PASS], [Test SQL password]) |
210 | AC_ARG_VAR([DBRW_TEST_DEBUG], [Debug settings for testing]) | 210 | 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@ | |||
10 | : ${DBRW_TEST_DBTYPE=@DBRW_TEST_DBTYPE@} | 10 | : ${DBRW_TEST_DBTYPE=@DBRW_TEST_DBTYPE@} |
11 | : ${DBRW_TEST_PARAMS=@DBRW_TEST_PARAMS@} | 11 | : ${DBRW_TEST_PARAMS=@DBRW_TEST_PARAMS@} |
12 | : ${DBRW_TEST_SERVER=@DBRW_TEST_SERVER@} | 12 | : ${DBRW_TEST_SERVER=@DBRW_TEST_SERVER@} |
13 | : ${DBRW_TEST_NAME=@DBRW_TEST_NAME@} | 13 | : ${DBRW_TEST_DATABASE=@DBRW_TEST_DATABASE@} |
14 | : ${DBRW_TEST_USER=@DBRW_TEST_USER@} | 14 | : ${DBRW_TEST_USER=@DBRW_TEST_USER@} |
15 | : ${DBRW_TEST_PASS=@DBRW_TEST_PASS@} | 15 | : ${DBRW_TEST_PASS=@DBRW_TEST_PASS@} |
16 | : ${DBRW_TEST_DEBUG=@DBRW_TEST_DEBUG@} | 16 | : ${DBRW_TEST_DEBUG=@DBRW_TEST_DEBUG@} |
@@ -18,8 +18,8 @@ VARNISHVERSION=@VARNISHVERSION@ | |||
18 | if [ -n "$DBRW_TEST_SERVER" ]; then | 18 | if [ -n "$DBRW_TEST_SERVER" ]; then |
19 | DBRW_TEST_PARAMS="$DBRW_TEST_PARAMS;server=$DBRW_TEST_SERVER" | 19 | DBRW_TEST_PARAMS="$DBRW_TEST_PARAMS;server=$DBRW_TEST_SERVER" |
20 | fi | 20 | fi |
21 | if [ -n "$DBRW_TEST_NAME" ]; then | 21 | if [ -n "$DBRW_TEST_DATABASE" ]; then |
22 | DBRW_TEST_PARAMS="$DBRW_TEST_PARAMS;database=$DBRW_TEST_NAME" | 22 | DBRW_TEST_PARAMS="$DBRW_TEST_PARAMS;database=$DBRW_TEST_DATABASE" |
23 | fi | 23 | fi |
24 | if [ -n "$DBRW_TEST_USER" ]; then | 24 | if [ -n "$DBRW_TEST_USER" ]; then |
25 | DBRW_TEST_PARAMS="$DBRW_TEST_PARAMS;user=$DBRW_TEST_USER" | 25 | DBRW_TEST_PARAMS="$DBRW_TEST_PARAMS;user=$DBRW_TEST_USER" |