Add adapter to get k8s cluster info
[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 docker-compose run --rm --no-deps --entrypoint=pytest api /tests/integration-ocloud --log-level=DEBUG --log-file=/test\r
29 s/debug.log\r
30 ```\r
31 \r
32 ## Tear down containers\r
33 \r
34 ```sh\r
35 docker-compose down --remove-orphans\r
36 ```\r
37 \r
38 ## Test with local virtualenv\r
39 \r
40 ```sh\r
41 python3.8 -m venv .venv && source .venv/bin/activate\r
42 pip install -r requirements.txt -c constraints.txt\r
43 pip install -r requirements-test.txt\r
44 pip install -e o2ims\r
45 # pip install -e o2dms -e o2common\r
46 pytest tests/unit\r
47 pytest tests/integration\r
48 pytest tests/e2e\r
49 ```\r