Skip to content

Commit d89837d

Browse files
authored
Merge pull request #117 from andrewthetechie/development-documentation
docs: update contributing docs
2 parents 5bf4a91 + 15da928 commit d89837d

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

docs/en/docs/contributing.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,27 @@ $ pip install -r tests/dev.requirements.txt
2727
</div>
2828

2929
### 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
3231
works and is bug free.
3332

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+
3451
<div class="termy">
3552

3653
```console

tests/conf/dev.docker-compose.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ services:
88
- dev.env
99
ports:
1010
- 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

0 commit comments

Comments
 (0)