diff --git a/.travis.yml b/.travis.yml index 7debc49e..696295f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,11 @@ language: python python: - "2.7" - - "3.3" - "3.4" + - "3.5" install: - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then pip install -r requirements-py2.txt --use-mirrors; fi - - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then pip install -r requirements-py3.txt --use-mirrors; fi + - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then pip install -r requirements-py3.txt; fi - pip install coveralls script: - python setup.py test diff --git a/requirements-py2.txt b/requirements-py2.txt index f8eacc12..1e194bc0 100644 --- a/requirements-py2.txt +++ b/requirements-py2.txt @@ -6,6 +6,6 @@ PyYAML requests six >= 1.7 kazoo>=2.2.1 -python-etcd>=0.4.1 +python-etcd==0.4.2 click>=4.1 prettytable>=0.7 diff --git a/requirements-py3.txt b/requirements-py3.txt index 30b5ce96..13c3010c 100644 --- a/requirements-py3.txt +++ b/requirements-py3.txt @@ -6,6 +6,6 @@ PyYAML requests six kazoo>=2.2.1 -python-etcd>=0.4.1 +python-etcd==0.4.2 click>=4.1 prettytable>=0.7 diff --git a/tests/test_ctl.py b/tests/test_ctl.py index 0d65a05c..093ead32 100644 --- a/tests/test_ctl.py +++ b/tests/test_ctl.py @@ -18,7 +18,7 @@ from patroni.etcd import Etcd, Client from test_ha import get_cluster_initialized_without_leader, get_cluster_initialized_with_leader, \ get_cluster_initialized_with_only_leader, MockPostgresql, MockPatroni, run_async, \ get_cluster_not_initialized_without_leader -from test_etcd import etcd_read, etcd_write, requests_get, MockResponse +from test_etcd import etcd_read, etcd_write, requests_get, socket_getaddrinfo, MockResponse from test_postgresql import MockConnect, psycopg2_connect CONFIG_FILE_PATH = './test-ctl.yaml' @@ -48,6 +48,7 @@ def test_rw_config(): @patch('patroni.ctl.load_config', Mock(return_value={'dcs': {'scheme': 'etcd', 'hostname': 'localhost', 'port': 4001}})) class TestCtl(unittest.TestCase): + @patch('socket.getaddrinfo', socket_getaddrinfo) @patch.object(Client, 'machines') def setUp(self, mock_machines): mock_machines.__get__ = Mock(return_value=['http://remotehost:2379'])