summaryrefslogtreecommitdiff
diff options
-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()