aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/deploy_kolla.sh45
-rw-r--r--tests/test_build.py27
2 files changed, 70 insertions, 2 deletions
diff --git a/tests/deploy_kolla.sh b/tests/deploy_kolla.sh
new file mode 100755
index 000000000..a5e5b2892
--- /dev/null
+++ b/tests/deploy_kolla.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+set -o xtrace
+set -o errexit
+
+export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+
+function print_failure {
+ docker ps -a
+ docker logs bootstrap_keystone
+ echo "FAILED"
+ exit 1
+}
+
+# Setup ssh key as required
+ssh-keygen -f kolla-ssh -N ""
+cat kolla-ssh.pub | tee /root/.ssh/authorized_keys
+
+# Install Ansible and docker-py
+pip install "ansible<2" docker-py
+pip freeze | egrep "docker|ansible"
+
+# Setup configs
+cp -a etc/kolla /etc/
+cat << EOF > /etc/kolla/globals.yml
+---
+kolla_base_distro: "$1"
+kolla_install_type: "$2"
+kolla_internal_address: "169.254.169.10"
+docker_pull_policy: "missing"
+docker_restart_policy: "no"
+network_interface: "eth0"
+neutron_external_interface: "fake_interface"
+EOF
+
+# Create dummy interface for neutron
+ip l a fake_interface type dummy
+
+# Actually do the deployment
+tools/kolla-ansible deploy || print_failure
+
+# TODO(SamYaple): Actually validate that all containers are started
+docker ps -a
+
+# TODO(SamYaple): Actually do functional testing of OpenStack
diff --git a/tests/test_build.py b/tests/test_build.py
index 8feb98d00..948e165ac 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -59,8 +59,7 @@ class BuildTest(base.BaseTestCase):
LOG.critical(">>> Expected image '%s' to succeed!" % image)
for image in unmatched_results.keys():
- failures = failures + 1
- LOG.critical(">>> Expected image '%s' to be matched!" % image)
+ LOG.warning(">>> Image '%s' was not matched" % image)
self.assertEqual(failures, 0, "%d failure(s) occurred" % failures)
@@ -84,3 +83,27 @@ class BuildTestUbuntuSource(BuildTest):
super(BuildTestUbuntuSource, self).setUp()
self.build_args.extend(["--base", "ubuntu",
"--type", "source"])
+
+
+class DeployTestCentosBinary(BuildTest):
+ def setUp(self):
+ super(BuildTestCentosBinary, self).setUp()
+ self.build_args.extend(["--base", "centos",
+ "--type", "binary",
+ "--profile", "gate"])
+
+
+class DeployTestCentosSource(BuildTest):
+ def setUp(self):
+ super(BuildTestCentosSource, self).setUp()
+ self.build_args.extend(["--base", "centos",
+ "--type", "source",
+ "--profile", "gate"])
+
+
+class DeployTestUbuntuSource(BuildTest):
+ def setUp(self):
+ super(BuildTestUbuntuSource, self).setUp()
+ self.build_args.extend(["--base", "ubuntu",
+ "--type", "source",
+ "--profile", "gate"])