Extract ocloud integration test
[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 \r
11 ```sh\r
12 source ./admin_openrc.sh\r
13 export |grep OS_AUTH_URL\r
14 export |grep OS_USERNAME\r
15 export |grep OS_PASSWORD\r
16 docker-compose up -d\r
17 docker-compose run --rm --no-deps --entrypoint=pytest api /tests/unit /tests/integration\r
18 ```\r
19 \r
20 ## Running the tests with a O-Cloud\r
21 \r
22 Prerequisite: in case of testing against real ocloud, download openrc file from ocloud dashboard, e.g. \r
23 \r
24 ```sh\r
25 admin_openrc.sh\r
26 docker-compose run --rm --no-deps --entrypoint=pytest api /tests/unit /tests/integration-ocloud\r
27 \r
28 ```\r
29 \r
30 ## Tear down containers\r
31 \r
32 ```sh\r
33 docker-compose down --remove-orphans\r
34 ```\r
35 \r
36 ## Test with local virtualenv\r
37 \r
38 ```sh\r
39 python3.8 -m venv .venv && source .venv/bin/activate\r
40 pip install -r requirements.txt -c constraints.txt\r
41 pip install -r requirements-test.txt\r
42 pip install -e o2ims\r
43 # pip install -e o2dms -e o2common\r
44 pytest tests/unit\r
45 pytest tests/integration\r
46 pytest tests/e2e\r
47 ```\r