27
27
from ceilometer.tests import base
30
class BinDbsyncTestCase(base.TestCase):
30
class BinTestCase(base.TestCase):
32
super(BinDbsyncTestCase, self).setUp()
32
super(BinTestCase, self).setUp()
33
33
self.tempfile = self.temp_config_file_path()
34
34
with open(self.tempfile, 'w') as tmp:
35
tmp.write("[DEFAULT]\n")
36
tmp.write("database_connection=log://localhost\n")
35
tmp.write("[database]\n")
36
tmp.write("connection=log://localhost\n")
38
38
def test_dbsync_run(self):
39
subp = subprocess.Popen([self.path_get('bin/ceilometer-dbsync'),
40
"--config-file=%s" % self.tempfile])
40
subp = subprocess.Popen(['ceilometer-dbsync',
41
"--config-file=%s" % self.tempfile])
43
self.skipTest('Skipped by Ubuntu')
44
self.assertEqual(subp.wait(), 0)
46
def test_run_expirer(self):
48
subp = subprocess.Popen(['ceilometer-expirer',
49
"--config-file=%s" % self.tempfile])
51
self.skipTest('Skipped by Ubuntu')
41
52
self.assertEqual(subp.wait(), 0)
54
65
"pipeline_cfg_file=%s\n" % pipeline_cfg_file)
56
67
def test_send_counter_run(self):
57
subp = subprocess.Popen([self.path_get('bin/ceilometer-send-counter'),
58
"--config-file=%s" % self.tempfile,
59
"--counter-resource=someuuid",
60
"--counter-name=mycounter"])
69
subp = subprocess.Popen([self.path_get('bin/ceilometer-send-counter'),
70
"--config-file=%s" % self.tempfile,
71
"--counter-resource=someuuid",
72
"--counter-name=mycounter"])
74
self.skiptest('Skipped by Ubuntu')
61
75
self.assertEqual(subp.wait(), 0)
86
99
tmp.write("[api]\n")
88
101
"port=%s\n" % self.api_port)
89
self.subp = subprocess.Popen([self.path_get('bin/ceilometer-api'),
90
"--config-file=%s" % self.tempfile])
102
tmp.write("[database]\n")
103
tmp.write("connection=log://localhost\n")
105
self.subp = subprocess.Popen(['ceilometer-api',
106
"--config-file=%s" % self.tempfile])
108
self.skipTest('Skipped by Ubuntu')
92
110
def tearDown(self):
93
111
super(BinApiTestCase, self).tearDown()