Skip to content

Commit

Permalink
Fix: don't verify hostname in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Tojek committed Feb 18, 2020
1 parent 3ea7cc0 commit 28f9acd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions metricbeat/module/haproxy/test_haproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 28f9acd

Please sign in to comment.