mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
IPv6 support (#1122)
fixes https://github.com/zalando/patroni/issues/1121
This commit is contained in:
+3
-1
@@ -2,6 +2,7 @@ import datetime
|
||||
import json
|
||||
import psycopg2
|
||||
import unittest
|
||||
import socket
|
||||
|
||||
from mock import Mock, PropertyMock, patch
|
||||
from patroni.api import RestApiHandler, RestApiServer
|
||||
@@ -413,7 +414,8 @@ class TestRestApiServer(unittest.TestCase):
|
||||
srv = MockRestApiServer(lambda a1, a2, a3: None, '')
|
||||
self.assertRaises(ValueError, srv.reload_config, bad_config)
|
||||
self.assertRaises(ValueError, srv.reload_config, {})
|
||||
srv.reload_config({'listen': '127.0.0.2:8008'})
|
||||
with patch.object(socket.socket, 'setsockopt', Mock(side_effect=socket.error)):
|
||||
srv.reload_config({'listen': ':8008'})
|
||||
|
||||
def test_handle_error(self):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user