Add dms handler
[pti/o2.git] / README.md
index eb6900a..1612e8e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,27 +1,42 @@
 ## Building containers\r
 \r
+To accommodate the git repo access issue, the cgts-client and distributed client are\r
+cloned into temp before docker building\r
 \r
 ```sh\r
-docker-compose build\r
+mkdir -p temp\r
+cd temp\r
+git clone https://opendev.org/starlingx/config.git\r
+git clone https://opendev.org/starlingx/distcloud-client.git\r
+cd -\r
 ```\r
 \r
-\r
-## Creating a local virtualenv (optional)\r
-\r
 ```sh\r
-python3.8 -m venv .venv && source .venv/bin/activate\r
-pip install -r requirements.txt\r
-pip install -e src/\r
+docker-compose build\r
 ```\r
 \r
 ## Running the tests\r
 \r
+\r
 ```sh\r
+source ./admin_openrc.sh\r
+export |grep OS_AUTH_URL\r
+export |grep OS_USERNAME\r
+export |grep OS_PASSWORD\r
 docker-compose up -d\r
 docker-compose run --rm --no-deps --entrypoint=pytest api /tests/unit /tests/integration\r
-pytest tests/unit\r
-pytest tests/integration\r
-pytest tests/e2e\r
+```\r
+\r
+## Running the tests with a O-Cloud\r
+\r
+Prerequisite: in case of testing against real ocloud, download openrc file from ocloud dashboard, e.g. \r
+\r
+```sh\r
+admin_openrc.sh\r
+docker-compose run --rm --no-deps --entrypoint=pytest api /tests/unit /tests/integration-ocloud\r
+\r
+docker-compose run --rm --no-deps --entrypoint=pytest api /tests/integration-ocloud --log-level=DEBUG --log-file=/test\r
+s/debug.log\r
 ```\r
 \r
 ## Tear down containers\r
@@ -29,3 +44,16 @@ pytest tests/e2e
 ```sh\r
 docker-compose down --remove-orphans\r
 ```\r
+\r
+## Test with local virtualenv\r
+\r
+```sh\r
+python3.8 -m venv .venv && source .venv/bin/activate\r
+pip install -r requirements.txt -c constraints.txt\r
+pip install -r requirements-test.txt\r
+pip install -e o2ims\r
+# pip install -e o2dms -e o2common\r
+pytest tests/unit\r
+pytest tests/integration\r
+pytest tests/e2e\r
+```\r