aboutsummaryrefslogtreecommitdiff
path: root/tests/test-magnum.sh
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2019-04-12 11:19:39 +0100
committerMark Goddard <mark@stackhpc.com>2020-09-17 15:01:53 +0000
commitd2326712d41e2a526dc7fef328f4b7dba7f58246 (patch)
treecb92d675c6e05091d754ae1ddfde288bf3c26d1d /tests/test-magnum.sh
parentb49c86848dcd8d256e54d424d917a3b3b94d2d2c (diff)
downloadkolla-ansible-d2326712d41e2a526dc7fef328f4b7dba7f58246.tar.gz
kolla-ansible-d2326712d41e2a526dc7fef328f4b7dba7f58246.zip
CI: add magnum scenario, also covering octavia
Adds a new Zuul job, kolla-ansible-centos8-source-magnum, for testing deployment of Magnum, Octavia and associated services. Change-Id: I61b293ba6bb52064ea98a73e2dff0023fa01a2a2
Diffstat (limited to 'tests/test-magnum.sh')
-rwxr-xr-xtests/test-magnum.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/test-magnum.sh b/tests/test-magnum.sh
new file mode 100755
index 000000000..9519fba25
--- /dev/null
+++ b/tests/test-magnum.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# Test deployment of magnum and octavia.
+
+set -o xtrace
+set -o errexit
+
+# Enable unbuffered output for Ansible in Jenkins.
+export PYTHONUNBUFFERED=1
+
+
+function test_magnum_clusters {
+ openstack coe cluster list
+ openstack coe cluster template list
+}
+
+function test_octavia {
+ openstack loadbalancer list
+}
+
+function test_magnum_logged {
+ . /etc/kolla/admin-openrc.sh
+ . ~/openstackclient-venv/bin/activate
+ test_magnum_clusters
+ test_octavia
+}
+
+function test_magnum {
+ echo "Testing Magnum and Octavia"
+ test_magnum_logged > /tmp/logs/ansible/test-magnum 2>&1
+ result=$?
+ if [[ $result != 0 ]]; then
+ echo "Testing Magnum and Octavia failed. See ansible/test-magnum for details"
+ else
+ echo "Successfully tested Magnum and Octavia. See ansible/test-magnum for details"
+ fi
+ return $result
+}
+
+test_magnum