diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 0000000000..ced275c5d3 --- /dev/null +++ b/bindep.txt @@ -0,0 +1,8 @@ +libpq-dev [platform:dpkg] +postgresql [platform:dpkg] +mysql-client [platform:dpkg] +mysql-server [platform:dpkg] +build-essential [platform:dpkg] +libffi-dev [platform:dpkg] +mongodb [platform:dpkg] +gettext [platform:dpkg] diff --git a/ceilometer/tests/functional/api/__init__.py b/ceilometer/tests/functional/api/__init__.py index 520009ca77..65e987022d 100644 --- a/ceilometer/tests/functional/api/__init__.py +++ b/ceilometer/tests/functional/api/__init__.py @@ -48,6 +48,7 @@ class FunctionalTest(db_test_base.TestBase): self.CONF.set_override('gnocchi_is_enabled', False, group='api') self.CONF.set_override('aodh_is_enabled', False, group='api') + self.CONF.set_override('panko_is_enabled', False, group='api') self.app = self._make_app() diff --git a/ceilometer/tests/functional/test_bin.py b/ceilometer/tests/functional/test_bin.py index ef46a18e96..0d8b245205 100644 --- a/ceilometer/tests/functional/test_bin.py +++ b/ceilometer/tests/functional/test_bin.py @@ -24,7 +24,9 @@ from ceilometer.tests import base class BinTestCase(base.BaseTestCase): def setUp(self): super(BinTestCase, self).setUp() - content = ("[database]\n" + content = ("[DEFAULT]\n" + "transport_url = fake://\n" + "[database]\n" "connection=log://localhost\n") if six.PY3: content = content.encode('utf-8') @@ -54,7 +56,9 @@ class BinTestCase(base.BaseTestCase): b"time to live is disabled", err) def _test_run_expirer_ttl_enabled(self, ttl_name, data_name): - content = ("[database]\n" + content = ("[DEFAULT]\n" + "transport_url = fake://\n" + "[database]\n" "%s=1\n" "connection=log://localhost\n" % ttl_name) if six.PY3: @@ -85,6 +89,7 @@ class BinSendSampleTestCase(base.BaseTestCase): super(BinSendSampleTestCase, self).setUp() pipeline_cfg_file = self.path_get('etc/ceilometer/pipeline.yaml') content = ("[DEFAULT]\n" + "transport_url = fake://\n" "pipeline_cfg_file={0}\n".format(pipeline_cfg_file)) if six.PY3: content = content.encode('utf-8') @@ -121,7 +126,9 @@ class BinCeilometerPollingServiceTestCase(base.BaseTestCase): super(BinCeilometerPollingServiceTestCase, self).tearDown() def test_starting_with_duplication_namespaces(self): - content = ("[database]\n" + content = ("[DEFAULT]\n" + "transport_url = fake://\n" + "[database]\n" "connection=log://localhost\n") if six.PY3: content = content.encode('utf-8') @@ -140,6 +147,7 @@ class BinCeilometerPollingServiceTestCase(base.BaseTestCase): def test_polling_namespaces_invalid_value_in_config(self): content = ("[DEFAULT]\n" + "transport_url = fake://\n" "polling_namespaces = ['central']\n" "[database]\n" "connection=log://localhost\n") diff --git a/ceilometer/tests/functional/test_notification.py b/ceilometer/tests/functional/test_notification.py index 7f5cb286cc..67fe5611ba 100644 --- a/ceilometer/tests/functional/test_notification.py +++ b/ceilometer/tests/functional/test_notification.py @@ -104,6 +104,8 @@ class TestNotification(tests_base.BaseTestCase): self.CONF.set_override("backend_url", None, group="coordination") self.CONF.set_override("disable_non_metric_meters", False, group="notification") + self.CONF.set_override("workload_partitioning", True, + group='notification') self.setup_messaging(self.CONF) self.srv = notification.NotificationService(0) @@ -119,6 +121,7 @@ class TestNotification(tests_base.BaseTestCase): ) @mock.patch('ceilometer.pipeline.setup_pipeline', mock.MagicMock()) + @mock.patch('ceilometer.pipeline.setup_event_pipeline', mock.MagicMock()) @mock.patch('ceilometer.event.endpoint.EventsNotificationEndpoint') def _do_process_notification_manager_start(self, fake_event_endpoint_class): @@ -156,6 +159,7 @@ class TestNotification(tests_base.BaseTestCase): self.srv.listeners[0].dispatcher.endpoints[0]) @mock.patch('ceilometer.pipeline.setup_pipeline', mock.MagicMock()) + @mock.patch('ceilometer.pipeline.setup_event_pipeline', mock.MagicMock()) @mock.patch('oslo_messaging.get_batch_notification_listener') def test_unique_consumers(self, mock_listener): @@ -505,6 +509,18 @@ class TestRealNotificationMultipleAgents(tests_base.BaseTestCase): suffix="yaml") return pipeline_cfg_file + def setup_event_pipeline(self): + pipeline = yaml.dump({ + 'sources': [], + 'sinks': [] + }) + if six.PY3: + pipeline = pipeline.encode('utf-8') + + pipeline_cfg_file = fileutils.write_to_tempfile( + content=pipeline, prefix="event_pipeline", suffix="yaml") + return pipeline_cfg_file + def setUp(self): super(TestRealNotificationMultipleAgents, self).setUp() self.CONF = self.useFixture(fixture_config.Config()).conf @@ -512,7 +528,10 @@ class TestRealNotificationMultipleAgents(tests_base.BaseTestCase): self.setup_messaging(self.CONF, 'nova') pipeline_cfg_file = self.setup_pipeline(['instance', 'memory']) + event_pipeline_cfg_file = self.setup_event_pipeline() self.CONF.set_override("pipeline_cfg_file", pipeline_cfg_file) + self.CONF.set_override("event_pipeline_cfg_file", + event_pipeline_cfg_file) self.CONF.set_override("backend_url", None, group="coordination") self.CONF.set_override("disable_non_metric_meters", False, group="notification") diff --git a/tox.ini b/tox.ini index 9778c1e806..7a4c6f4212 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 1.8 skipsdist = True -envlist = py{34,27,35},{debug,py,py34,py27,py35}-{mongodb,mysql,pgsql,elastic,functional},pep8 +envlist = py{34,27,35},{debug,py,py34,py27,py35}-{mongodb,mysql,postgresql,elastic,functional},pep8 [testenv] deps = .[mongo,mysql,postgresql,gnocchi] @@ -16,7 +16,7 @@ setenv = VIRTUAL_ENV={envdir} {mongodb,mysql,pgsql,elastic,functional}: OS_TEST_PATH=ceilometer/tests/functional/ mongodb: CEILOMETER_TEST_BACKEND=mongodb mysql: CEILOMETER_TEST_BACKEND=mysql - pgsql: CEILOMETER_TEST_BACKEND=postgresql + postgresql: CEILOMETER_TEST_BACKEND=postgresql elastic: CEILOMETER_TEST_BACKEND=elasticsearch functional: CEILOMETER_TEST_BACKEND={env:CEILOMETER_TEST_BACKEND:mongodb} passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE CEILOMETER_*