ea2bdb4faee66077ed6df89d3df6eb8d6b2d5a6d
[pti/o2.git] / README.md
1 ## Building containers\r
2 \r
3 \r
4 ```sh\r
5 docker-compose build\r
6 ```\r
7 \r
8 ## Running the tests\r
9 \r
10 Prerequisite: in case of testing against real ocloud, download openrc file from ocloud dashboard, e.g. admin_openrc.sh\r
11 \r
12 ```sh\r
13 source ./admin_openrc.sh\r
14 export |grep OS_AUTH_URL\r
15 export |grep OS_USERNAME\r
16 export |grep OS_PASSWORD\r
17 docker-compose up -d\r
18 docker-compose run --rm --no-deps --entrypoint=pytest api /tests/unit /tests/integration\r
19 \r
20 ```\r
21 \r
22 ## Tear down containers\r
23 \r
24 ```sh\r
25 docker-compose down --remove-orphans\r
26 ```\r
27 \r
28 ## Test with local virtualenv\r
29 \r
30 ```sh\r
31 python3.8 -m venv .venv && source .venv/bin/activate\r
32 pip install -r requirements.txt -c constraints.txt\r
33 pip install -r requirements-test.txt\r
34 pip install -e o2ims\r
35 # pip install -e o2dms -e o2common\r
36 pytest tests/unit\r
37 pytest tests/integration\r
38 pytest tests/e2e\r
39 ```\r