Commit ac16ff0b authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis

ci: Extend tests.sh to run astakosclient unittests

parent 3d711cd6
......@@ -64,7 +64,7 @@ cmd_options = --nofailfast --no-ipv6 --action-timeout=240
[Unit Tests]
component = astakos cyclades pithos
component = astakos cyclades pithos astakosclient
[Repository]
......
......@@ -64,7 +64,7 @@ cmd_options = --nofailfast --no-ipv6 --action-timeout=240
[Unit Tests]
component = astakos cyclades pithos
component = astakos cyclades pithos astakosclient
[Repository]
......
......@@ -4,15 +4,19 @@ set -e
SNF_MANAGE=$(which snf-manage) ||
{ echo "Cannot find snf-manage in $PATH" 1>&2; exit 1; }
runtest () {
runTest () {
TEST="$SNF_MANAGE test $* --traceback --noinput --settings=synnefo.settings.test"
runCoverage "$TEST"
}
runCoverage () {
if coverage >/dev/null 2>&1; then
coverage run $TEST
coverage run $1
coverage report --include=snf-*
else
echo "WARNING: Cannot find coverage in path, skipping coverage tests" 1>&2
$TEST
$1
fi
}
......@@ -24,17 +28,20 @@ PITHOS_APPS="api"
TEST_COMPONENTS="$@"
if [ -z "$TEST_COMPONENTS" ]; then
TEST_COMPONENTS="astakos cyclades pithos"
TEST_COMPONENTS="astakos cyclades pithos astakosclient"
fi
for component in $TEST_COMPONENTS; do
if [ "$component" = "astakos" ]; then
runtest $ASTAKOS_APPS
runTest $ASTAKOS_APPS
elif [ "$component" = "cyclades" ]; then
export SYNNEFO_EXCLUDE_PACKAGES="snf-pithos-app"
runtest $CYCLADES_APPS
runTest $CYCLADES_APPS
elif [ "$component" = "pithos" ]; then
export SYNNEFO_EXCLUDE_PACKAGES="snf-cyclades-app"
runtest $PITHOS_APPS
runTest $PITHOS_APPS
elif [ "$component" = "astakosclient" ]; then
TEST="nosetests astakosclient"
runCoverage "$TEST"
fi
done
......@@ -856,6 +856,7 @@ class SynnefoCI(object):
cmd = """
pip install -U mock
pip install -U factory_boy
pip install -U nose
"""
_run(cmd, False)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment