From: Thomas Duval Date: Fri, 1 Dec 2017 10:18:17 +0000 (+0100) Subject: Add unit tests for moon_db X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=9c14ca82d4d17dfa66cb0b68f1e9c72b62ff1749;p=moon.git Add unit tests for moon_db Change-Id: I98c18e696bd9dffe8c0ccc62df6c5210d78b4ab4 --- diff --git a/moonv4/moon_db/tests/README.md b/moonv4/moon_db/tests/README.md new file mode 100644 index 00000000..73a9fcd2 --- /dev/null +++ b/moonv4/moon_db/tests/README.md @@ -0,0 +1,35 @@ +# Tests + +## Python Unit Test for moon_db + +- launch Docker for Python unit tests + + + cd ${MOON_HOME}/moonv4/moon_db/ + docker run -ti --volume ${PWD}:/data asteroide/moon_tests + + +## Build and upload python packages + +- build python packages + + + python setup.py sdist bdist_wheel + + +- upload moon_db to PIP + + + python setup.py upload + + +or + + + gpg --detach-sign -u "${GPG_ID}" -a dist/moon_db-X.Y.Z-py3-none-any.whl + gpg --detach-sign -u "${GPG_ID}" -a dist/moon_db-X.Y.Z.tar.gz + twine upload dist/moon_db-X.Y.Z-py3-none-any.whl dist/moon_db-X.Y.Z-py3-none-any.whl.asc + twine upload dist/moon_db-X.Y.Z.tar.gz dist/moon_db-X.Y.Z.tar.gz.asc + + + diff --git a/moonv4/moon_db/tests/unit_python/configure_db.sh b/moonv4/moon_db/tests/unit_python/configure_db.sh deleted file mode 100644 index bdc259fe..00000000 --- a/moonv4/moon_db/tests/unit_python/configure_db.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -apt-get install mysql-server python-mysqldb python-pymysql - -mysql -uroot -ppassword <