From 9363a64af757c40cffb918a3dc2ba5fef274f7de Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Mon, 28 Jan 2019 09:31:33 +0100 Subject: [PATCH 1/2] Fix port in couchdb module system test --- metricbeat/tests/system/test_couchdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metricbeat/tests/system/test_couchdb.py b/metricbeat/tests/system/test_couchdb.py index 9e65b5dd45c5..7250b193e0e9 100644 --- a/metricbeat/tests/system/test_couchdb.py +++ b/metricbeat/tests/system/test_couchdb.py @@ -32,4 +32,4 @@ def test_stats(self): def get_hosts(self): return [os.getenv('COUCHDB_HOST', 'localhost') + ':' + - os.getenv('COUCHDB_PORT', '5894')] + os.getenv('COUCHDB_PORT', '5984')] From d69fe291ac722480791ff565d36b2345187b45d2 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Mon, 28 Jan 2019 10:02:00 +0100 Subject: [PATCH 2/2] Check for errors in event --- metricbeat/tests/system/test_couchdb.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/metricbeat/tests/system/test_couchdb.py b/metricbeat/tests/system/test_couchdb.py index 7250b193e0e9..ddf6b459307f 100644 --- a/metricbeat/tests/system/test_couchdb.py +++ b/metricbeat/tests/system/test_couchdb.py @@ -25,10 +25,12 @@ def test_stats(self): output = self.read_output_json() self.assertTrue(len(output) >= 1) - evt = output[0] - print(evt) + event = output[0] + print(event) - self.assert_fields_are_documented(evt) + self.assertNotIn("error", event) + + self.assert_fields_are_documented(event) def get_hosts(self): return [os.getenv('COUCHDB_HOST', 'localhost') + ':' +