comparison doc/contribuing/testing.rst @ 3644:062a09705d43

doc (contributing): fix `docker-compose-e2e.yml` spelling
author Goffi <goffi@goffi.org>
date Wed, 08 Sep 2021 11:15:24 +0200
parents 4705f80b6e23
children
comparison
equal deleted inserted replaced
3643:30196b9a2b4c 3644:062a09705d43
26 26
27 end-to-end tests 27 end-to-end tests
28 ================ 28 ================
29 29
30 End-to-end tests are located in ``tests/e2e``. They are launched in a well defined 30 End-to-end tests are located in ``tests/e2e``. They are launched in a well defined
31 environment managed through Docker. The ``docker/docker-compose_e2e.yml`` is used to 31 environment managed through Docker. The ``docker/docker-compose-e2e.yml`` is used to
32 create the suitable containers. 32 create the suitable containers.
33 33
34 A script is available at ``tests/e2e/run_e2e.py`` to launch the tests. It will create the 34 A script is available at ``tests/e2e/run_e2e.py`` to launch the tests. It will create the
35 containers, bind the current code to them, and set environment variables according to 35 containers, bind the current code to them, and set environment variables according to
36 arguments. 36 arguments.
66 at the end of the tests. Note that if you want to have profiles created, or extra tools 66 at the end of the tests. Note that if you want to have profiles created, or extra tools
67 like the fake SMTP server, you'll have to launch at least one test which require them. 67 like the fake SMTP server, you'll have to launch at least one test which require them.
68 To log-in into the ``backend`` container, you can use the following command, from 68 To log-in into the ``backend`` container, you can use the following command, from
69 ``/docker`` directory:: 69 ``/docker`` directory::
70 70
71 $ docker-compose -f docker-compose_e2e.yml exec backend /bin/bash 71 $ docker-compose -f docker-compose-e2e.yml exec backend /bin/bash
72 72
73 Then run a python console with given instructions 73 Then run a python console with given instructions
74 74
75 It's also good to know that in the e2e test environment, the following pytest plugins are 75 It's also good to know that in the e2e test environment, the following pytest plugins are
76 installed and used: 76 installed and used:
222 $ ./run_e2e.py -k user_can_create_account --dev-mode 222 $ ./run_e2e.py -k user_can_create_account --dev-mode
223 223
224 …then to go into the ``backend`` container and work with the browser (to be run in ``docker`` 224 …then to go into the ``backend`` container and work with the browser (to be run in ``docker``
225 directory)…:: 225 directory)…::
226 226
227 $ docker-compose -f docker-compose_e2e.yml exec backend /bin/bash 227 $ docker-compose -f docker-compose-e2e.yml exec backend /bin/bash
228 228
229 …and, inside the container, you can now run ``python3`` and enter instruction prints at 229 …and, inside the container, you can now run ``python3`` and enter instruction prints at
230 the end of the test session. 230 the end of the test session.