kolla-ansible/tests/test-magnum.sh
Mark Goddard d2326712d4 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
2020-09-17 15:01:53 +00:00

41 lines
873 B
Bash
Executable File

#!/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