From 28f9acd2603e64fc19a09cd141fc6f1e9a5cead8 Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Sat, 15 Feb 2020 15:40:55 +0100 Subject: [PATCH] Fix: don't verify hostname in tests --- metricbeat/module/haproxy/test_haproxy.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/metricbeat/module/haproxy/test_haproxy.py b/metricbeat/module/haproxy/test_haproxy.py index bd585317070..40ab58f847f 100644 --- a/metricbeat/module/haproxy/test_haproxy.py +++ b/metricbeat/module/haproxy/test_haproxy.py @@ -46,7 +46,7 @@ def _test_stat(self): proc = self.start_beat() self.wait_until(lambda: self.output_lines() > 0) proc.check_kill_and_wait() - self.assert_no_logged_warnings() + self.assert_no_logged_warnings(replace=['SSL/TLS verifications disabled.']) output = self.read_output_json() self.assertGreater(len(output), 0) @@ -95,7 +95,10 @@ def test_stat_https(self): "extras": { "ssl.certificate_authorities": [os.path.join(os.path.dirname(__file__), '_meta/certs/ca.pem')], "ssl.certificate": os.path.join(os.path.dirname(__file__), '_meta/certs/client.pem'), - "ssl.key": os.path.join(os.path.dirname(__file__), '_meta/certs/client.key') + "ssl.key": os.path.join(os.path.dirname(__file__), '_meta/certs/client.key'), + # TODO: verification_mode: "certificate" + # compose uses dynamic IP addresses and there are no IP SAN records in the certificate + "ssl.verification_mode": "none" } }]) self._test_stat()