diff options
author | RHE <rebirthmonkey@gmail.com> | 2017-12-01 16:42:57 +0100 |
---|---|---|
committer | RHE <rebirthmonkey@gmail.com> | 2017-12-01 16:42:57 +0100 |
commit | c47f1f819cd81efa3c7f9bc64cda30d337730210 (patch) | |
tree | a6cd65fc4c0394bc0b49ac9003d83e31339b8908 /moonv4/moon_utilities | |
parent | fe8cf8dcabfcd223e8661f3af8ac02f4e6b1e708 (diff) |
create moon python unit test docker image
Change-Id: I91c7103ca046a67c3cefadbd9ca6eca52cfbc0cf
Signed-off-by: RHE <rebirthmonkey@gmail.com>
Diffstat (limited to 'moonv4/moon_utilities')
-rw-r--r-- | moonv4/moon_utilities/README.md | 11 | ||||
-rw-r--r-- | moonv4/moon_utilities/tests/README.md | 12 | ||||
-rw-r--r-- | moonv4/moon_utilities/tests/unit_python/Dockerfile | 7 | ||||
-rw-r--r-- | moonv4/moon_utilities/tests/unit_python/requirements.txt | 10 | ||||
-rw-r--r-- | moonv4/moon_utilities/tests/unit_python/run_tests.sh | 8 |
5 files changed, 11 insertions, 37 deletions
diff --git a/moonv4/moon_utilities/README.md b/moonv4/moon_utilities/README.md index b658a864..f5fa43ca 100644 --- a/moonv4/moon_utilities/README.md +++ b/moonv4/moon_utilities/README.md @@ -8,5 +8,16 @@ For any other information, refer to the parent project: moon_utilities is a common Python lib for other Moon Python packages +## Build +### Build Python Package +- `cd moon_utilities` +- `python3 setup.py sdist bdist_wheel` +### Push Python Package to PIP + +## Test +### Python Unit Test +- launch Docker for Python unit tests + - `cd moon_utilities` + - `docker run --rm --volume $(pwd):/data wukongsun/moon_python_unit_test:latest` diff --git a/moonv4/moon_utilities/tests/README.md b/moonv4/moon_utilities/tests/README.md deleted file mode 100644 index ddb4f55d..00000000 --- a/moonv4/moon_utilities/tests/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Tests - -## Python Unit Test for moon_utilities -- build the moon_utilities package -- launch Docker for Python unit tests - - `cd moon_utilities` - - `docker run --volume $(pwd):/data moon_utilities_test` -- upload moon_utilities to PIP - - - - diff --git a/moonv4/moon_utilities/tests/unit_python/Dockerfile b/moonv4/moon_utilities/tests/unit_python/Dockerfile deleted file mode 100644 index 681edcd7..00000000 --- a/moonv4/moon_utilities/tests/unit_python/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM python:3 - -RUN pip install pytest requests_mock requests --upgrade -ADD requirements.txt /root -RUN pip install -r /root/requirements.txt --upgrade - -CMD ["sh", "/data/tests/unit_python/run_tests.sh"]
\ No newline at end of file diff --git a/moonv4/moon_utilities/tests/unit_python/requirements.txt b/moonv4/moon_utilities/tests/unit_python/requirements.txt deleted file mode 100644 index b611b008..00000000 --- a/moonv4/moon_utilities/tests/unit_python/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -kombu !=4.0.1,!=4.0.0 -oslo.messaging -oslo.config -oslo.log -vine -werkzeug -flask -requests -pytest -requests_mock
\ No newline at end of file diff --git a/moonv4/moon_utilities/tests/unit_python/run_tests.sh b/moonv4/moon_utilities/tests/unit_python/run_tests.sh deleted file mode 100644 index 527e3dc4..00000000 --- a/moonv4/moon_utilities/tests/unit_python/run_tests.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -cd /data -pip3 install -r tests/unit_python/requirements.txt --upgrade -pip3 install . - -cd /data/tests/unit_python -pytest . |