1 ## Building containers
\r
3 To accommodate the git repo access issue, the cgts-client and distributed client are
\r
4 cloned into temp before docker building
\r
9 git clone https://opendev.org/starlingx/config.git
\r
10 git clone https://opendev.org/starlingx/distcloud-client.git
\r
15 docker-compose build
\r
18 ## Running the tests
\r
22 source ./admin_openrc.sh
\r
23 export |grep OS_AUTH_URL
\r
24 export |grep OS_USERNAME
\r
25 export |grep OS_PASSWORD
\r
26 docker-compose up -d
\r
27 docker-compose run --rm --no-deps --entrypoint=pytest api /tests/unit /tests/integration
\r
30 ## Running the tests with a O-Cloud
\r
32 Prerequisite: in case of testing against real ocloud, download openrc file from ocloud dashboard, e.g.
\r
36 docker-compose run --rm --no-deps --entrypoint=pytest api /tests/unit /tests/integration-ocloud
\r
38 docker-compose run --rm --no-deps --entrypoint=pytest api /tests/integration-ocloud --log-level=DEBUG --log-file=/test
\r
42 ## Tear down containers
\r
45 docker-compose down --remove-orphans
\r
48 ## Test with local virtualenv
\r
51 python3.8 -m venv .venv && source .venv/bin/activate
\r
52 pip install -r requirements.txt -c constraints.txt
\r
53 pip install -r requirements-test.txt
\r
54 pip install -e o2ims
\r
55 # pip install -e o2dms -e o2common
\r
57 pytest tests/integration
\r