summaryrefslogtreecommitdiff
path: root/tests
diff options
authorCharles Butler <chuck@dasroot.net>2014-07-29 11:07:21 -0400
committerCharles Butler <chuck@dasroot.net>2014-07-29 11:07:21 -0400
commitef3b4c384a6e6692b8a58f63c1de094f84bd2197 (patch)
tree0bf3ed07d6a001489ff3936b0208db5634612691 /tests
parent2572ec2619178c69500a53b53e48f8b40fb2f9f0 (diff)
Adds ceilometer test to validate we havent hozed openstack
Diffstat (limited to 'tests')
-rwxr-xr-xtests/200_relate_ceilometer.test42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/200_relate_ceilometer.test b/tests/200_relate_ceilometer.test
new file mode 100755
index 0000000..c5018aa
--- /dev/null
+++ b/tests/200_relate_ceilometer.test
@@ -0,0 +1,42 @@
+#!/usr/bin/env python3
+
+import amulet
+import pdb
+
+class TestDeploy(object):
+
+ def __init__(self, time=2500):
+ # Attempt to load the deployment topology from a bundle.
+ self.deploy = amulet.Deployment(series="trusty")
+
+ # If something errored out, attempt to continue by
+ # manually specifying a standalone deployment
+ self.deploy.add('mongodb')
+ self.deploy.add('ceilometer', 'cs:trusty/ceilometer')
+ # send blank configs to finalize the objects in the deployment map
+ self.deploy.configure('mongodb', {})
+ self.deploy.configure('ceilometer', {})
+
+ self.deploy.relate('mongodb:database', 'ceilometer:shared-db')
+
+ try:
+ self.deploy.setup(time)
+ self.deploy.sentry.wait(time)
+ except:
+ amulet.raise_status(amulet.FAIL, msg="Environment standup timeout")
+ # sentry = self.deploy.sentry
+
+ def run(self):
+ for test in dir(self):
+ if test.startswith('test_'):
+ getattr(self, test)()
+
+ def test_mongo(self):
+ unit = self.deploy.sentry.unit['ceilometer/0']
+ cont = unit.file_contents('/etc/ceilometer/ceilometer.conf')
+ if "mongodb://" not in cont:
+ amulet.raise_status(amulet.FAIL, "Unable to verify ceiolmeter cfg")
+
+if __name__ == '__main__':
+ runner = TestDeploy()
+ runner.run()