From d6c4972d415057d609d3874b7bfb1829bd1ac6e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarom=C3=ADr=20Wysoglad?= Date: Fri, 13 Oct 2023 09:08:38 +0200 Subject: [PATCH] Add sg-core integration test Depends-On: I01ed2c96395baf294aa84e4f989ab82f9b387fc4 Change-Id: Ibedd21fee25214409a3683bb58e18017918c59b2 --- .zuul.yaml | 4 +++- telemetry_tempest_plugin/config.py | 4 ++++ .../ceilometer-sg-core-integration.yaml | 10 ++++++++++ .../scenario/test_telemetry_integration.py | 2 ++ 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 telemetry_tempest_plugin/scenario/telemetry_integration_gabbits/ceilometer-sg-core-integration.yaml diff --git a/.zuul.yaml b/.zuul.yaml index f4f7774..07b1af8 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -78,6 +78,7 @@ - openstack/diskimage-builder - openstack/tempest - gnocchixyz/gnocchi + - infrawatch/sg-core vars: &base_vars configure_swap_size: 8192 devstack_plugins: @@ -85,13 +86,14 @@ ceilometer: https://opendev.org/openstack/ceilometer aodh: https://opendev.org/openstack/aodh panko: https://opendev.org/openstack/panko + sg-core: https://github.com/infrawatch/sg-core devstack_services: tempest: true devstack_localrc: USE_PYTHON3: True TEMPEST_PLUGINS: '"/opt/stack/telemetry-tempest-plugin /opt/stack/heat-tempest-plugin"' GNOCCHI_ARCHIVE_POLICY_TEMPEST: "ceilometer-high-rate" - CEILOMETER_BACKEND: "gnocchi" + CEILOMETER_BACKENDS: "gnocchi,sg-core" CEILOMETER_PIPELINE_INTERVAL: 15 CEILOMETER_ALARM_THRESHOLD: 6000000000 devstack_local_conf: diff --git a/telemetry_tempest_plugin/config.py b/telemetry_tempest_plugin/config.py index e12d3f9..ef43cf7 100644 --- a/telemetry_tempest_plugin/config.py +++ b/telemetry_tempest_plugin/config.py @@ -70,6 +70,10 @@ TelemetryGroup = [ default=False, help="Disable SSL certificate validation when running " "scenario tests"), + cfg.StrOpt('sg_core_service_url', + default="127.0.0.1:3000", + help="URL to sg-core prometheus endpoint"), + ] event_opts = [ diff --git a/telemetry_tempest_plugin/scenario/telemetry_integration_gabbits/ceilometer-sg-core-integration.yaml b/telemetry_tempest_plugin/scenario/telemetry_integration_gabbits/ceilometer-sg-core-integration.yaml new file mode 100644 index 0000000..f4cd0b1 --- /dev/null +++ b/telemetry_tempest_plugin/scenario/telemetry_integration_gabbits/ceilometer-sg-core-integration.yaml @@ -0,0 +1,10 @@ +tests: + - name: Check for ceilometer metrics + desc: Check the sg-core prometheus endpoint for ceilometer metrics + GET: $ENVIRON['SG_CORE_SERVICE_URL']/metrics + poll: + count: 60 + delay: 2 + response_strings: + - "ceilometer_image_size" + - "sg_total_ceilometer_metric_decode_error_count{source=\"SG\"} 0" diff --git a/telemetry_tempest_plugin/scenario/test_telemetry_integration.py b/telemetry_tempest_plugin/scenario/test_telemetry_integration.py index 7db4fd5..3cd7301 100644 --- a/telemetry_tempest_plugin/scenario/test_telemetry_integration.py +++ b/telemetry_tempest_plugin/scenario/test_telemetry_integration.py @@ -94,6 +94,8 @@ class TestTelemetryIntegration(manager.ScenarioTest): "HEAT_SERVICE_URL": self._get_endpoint(auth, "heat_plugin"), "NOVA_SERVICE_URL": self._get_endpoint(auth, "compute"), "GLANCE_SERVICE_URL": self._get_endpoint(auth, "image"), + "SG_CORE_SERVICE_URL": + str(config.CONF.telemetry.sg_core_service_url), "GLANCE_IMAGE_NAME": self.image_create(), "NOVA_FLAVOR_REF": config.CONF.compute.flavor_ref, "NEUTRON_NETWORK": networks[0].get('id'),