-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathNOTES.txt
46 lines (35 loc) · 1.24 KB
/
NOTES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
How to run tests for check functions
------------------------------------
Build docker image:
docker build --file=Dockerfile.worker --tag=qc_tool_worker .
Run container with postgis service:
docker run --rm \
--interactive --tty \
--publish 15432:5432 \
--name=qc_tool_postgis \
--user=postgres \
eeacms/copernicus-qctool-worker \
/usr/lib/postgresql/11/bin/postgres -D /var/lib/postgresql/11/main -c config_file=/etc/postgresql/11/main/postgresql.conf
Switch to other terminal.
Setup QC_TOOL_HOME to your development source files, eg.
QC_TOOL_HOME=/home/igor/projects/copernicus_quality_tools
Run all tests:
docker run --rm \
--interactive --tty \
--name=qc_tool_test \
--link=qc_tool_postgis \
--env=PG_HOST=qc_tool_postgis \
--env=SKIP_INSPIRE_CHECK=no \
--volume=$QC_TOOL_HOME:/usr/local/src/copernicus_quality_tools \
eeacms/copernicus-qctool-worker \
python3 -m unittest discover qc_tool.test
Run specific tests:
docker run --rm \
--interactive --tty \
--name=qc_tool_test \
--link=qc_tool_postgis \
--env=PG_HOST=qc_tool_postgis \
--env=SKIP_INSPIRE_CHECK=yes \
--volume=$QC_TOOL_HOME:/usr/local/src/copernicus_quality_tools \
eeacms/copernicus-qctool-worker \
python3 -m unittest qc_tool.test.test_vector_check