File tree Expand file tree Collapse file tree 2 files changed +27
-10
lines changed Expand file tree Collapse file tree 2 files changed +27
-10
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,27 @@ $ pip install -r tests/dev.requirements.txt
27
27
</div >
28
28
29
29
### Testing
30
- Crudrouter utilizes the [ pytest] ( https://docs.pytest.org/en/latest/ ) framework for all of its unittests. Tests can be run
31
- as shown below. When adding additional features, please try to add additional tests that prove that your implementation
30
+ When adding additional features, please try to add additional tests that prove that your implementation
32
31
works and is bug free.
33
32
33
+ #### Test requirements
34
+ Tests require a postgres database for tests to run. The easiest way to accomplish this is with docker. This project offers
35
+ a docker-compose file at tests/conf/dev.docker-compose.yaml. You can use this file with
36
+
37
+ ``` console
38
+ $ docker compose -f tests/conf/dev.docker-compose.yaml up -d
39
+ ```
40
+
41
+ After testing you can tear down the running containers with
42
+
43
+ ``` console
44
+ $ docker compose -f tests/conf/dev.docker-compose.yaml down
45
+ ```
46
+
47
+ #### Running tests
48
+ Crudrouter utilizes the [ pytest] ( https://docs.pytest.org/en/latest/ ) framework for all of its unittests. Tests can be run
49
+ as shown below.
50
+
34
51
<div class =" termy " >
35
52
36
53
``` console
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ services:
8
8
- dev.env
9
9
ports :
10
10
- 5432:5432
11
- mssql :
12
- image : mcr.microsoft.com/mssql/server:2019-latest
13
- command : /bin/sh -c "(/opt/mssql/bin/sqlservr &) && sleep 10s && /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Password1! -Q 'CREATE DATABASE test' && sleep infinity"
14
- restart : always
15
- env_file :
16
- - dev.env
17
- ports :
18
- - 1433:1433
11
+ # mssql:
12
+ # image: mcr.microsoft.com/mssql/server:2019-latest
13
+ # command: /bin/sh -c "(/opt/mssql/bin/sqlservr &) && sleep 10s && /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Password1! -Q 'CREATE DATABASE test' && sleep infinity"
14
+ # restart: always
15
+ # env_file:
16
+ # - dev.env
17
+ # ports:
18
+ # - 1433:1433
You can’t perform that action at this time.
0 commit comments