From 9f53dffb99ce4ef520828917792995953a9357c8 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Tue, 11 Jun 2019 12:28:51 -0700 Subject: [PATCH 1/2] System test for kibana module, xpack code path --- metricbeat/tests/system/test_kibana.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/metricbeat/tests/system/test_kibana.py b/metricbeat/tests/system/test_kibana.py index 33f6f376c1b..f1780d42e71 100644 --- a/metricbeat/tests/system/test_kibana.py +++ b/metricbeat/tests/system/test_kibana.py @@ -47,6 +47,27 @@ def test_status(self): self.assert_fields_are_documented(evt) + def test_xpack(self): + """ + kibana-xpack module tests + """ + self.render_config_template(modules=[{ + "name": "kibana", + "metricsets": [ + "stats" + ], + "hosts": self.get_hosts(), + "period": "1s", + "extras": { + "xpack.enabled": "true" + } + }]) + + proc = self.start_beat() + self.wait_until(lambda: self.output_lines() > 0) + proc.check_kill_and_wait() + self.assert_no_logged_warnings() + def get_hosts(self): return [self.compose_host("kibana")] From 96fd032ffcd835d8e3f7a8b260f8e121d15c19f3 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Mon, 17 Jun 2019 12:17:44 -0700 Subject: [PATCH 2/2] Adding skip annotation for integration tests --- metricbeat/tests/system/test_kibana.py | 1 + 1 file changed, 1 insertion(+) diff --git a/metricbeat/tests/system/test_kibana.py b/metricbeat/tests/system/test_kibana.py index f1780d42e71..90914082d87 100644 --- a/metricbeat/tests/system/test_kibana.py +++ b/metricbeat/tests/system/test_kibana.py @@ -47,6 +47,7 @@ def test_status(self): self.assert_fields_are_documented(evt) + @unittest.skipUnless(metricbeat.INTEGRATION_TESTS, "integration test") def test_xpack(self): """ kibana-xpack module tests