You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+27-7Lines changed: 27 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -205,31 +205,51 @@ If you'd like to help with the project itself, here are some other ways you can
205
205
206
206
Testing
207
207
~~~~~~~
208
-
This role includes a Vagrantfile used with a Docker-based test harness for integration testing. Using Vagrant allows all contributors to test on the same platform and avoid false test failures due to untested or incompatible docker versions.
208
+
Testing can be done using the provided Vagrantfile or by installing `Docker <https://docs.docker.com/engine/installation/>`__ and `Docker Compose <https://docs.docker.com/compose/>`__ locally.
209
+
210
+
Testing with Vagrant
211
+
"""""""""""""""""""""
212
+
This role includes a Vagrantfile used with a Docker-based test harness that approximates the Travis CI setup for integration testing. Using Vagrant allows all contributors to test on the same platform and avoid false test failures due to untested or incompatible docker versions.
209
213
210
214
1. Install `Vagrant <https://www.vagrantup.com/>`__ and `VirtualBox <https://www.virtualbox.org/>`__.
211
215
212
216
2. Run ``vagrant up`` from the same directory as the Vagrantfile in this repository.
213
217
214
-
3. SSH into the VM with: ``vagrant ssh`` or ``ssh 127.0.0.1:2222`` or ``ssh 10.1.15.10``
218
+
3. SSH into the VM with: ``vagrant ssh``
219
+
220
+
4. Run tests with ``make``.
221
+
222
+
::
223
+
224
+
make -C /vagrant xenial64 test
225
+
226
+
Integration tests use **systemd** by default. Set ``PROCESS_CONTROL`` to change this:
227
+
228
+
::
229
+
230
+
make -C /vagrant trusty64 test PROCESS_CONTROL=supervisor
231
+
232
+
See ``make help`` for more information including a full list of available targets.
233
+
234
+
Testing with Docker and Docker Compose locally
235
+
""""""""""""""""""""""""""""""""""""""""""""""""
236
+
Alternatively, you can install `Docker <https://docs.docker.com/engine/installation/>`__ and `Docker Compose <https://docs.docker.com/compose/>`__ to run these tests locally on your machine.
215
237
216
-
4. Change directories into **/vagrant** with the command: ``cd /vagrant``
238
+
1. Install `Docker <https://docs.docker.com/engine/installation/>`__ and `Docker Compose <https://docs.docker.com/compose/>`__.
217
239
218
-
5. Test the role against each Dockerfile with ``make``:
240
+
2. Run tests with ``make``.
219
241
220
242
::
221
243
222
244
make jessie64 test
223
-
make centos7 test
224
-
make xenial64 test
225
245
226
246
Integration tests use **systemd** by default. Set ``PROCESS_CONTROL`` to change this:
227
247
228
248
::
229
249
230
250
make trusty64 test PROCESS_CONTROL=supervisor
231
251
232
-
See ``make help`` for more information.
252
+
See ``make help`` for more information including a full list of available targets.
0 commit comments