Skip to content

Commit d120e9b

Browse files
committed
Support Serf v0.7.0, closes #28
Serf v0.7 was released on Dec 21, 2015 as part of `0df3e3df1` at https://github.com/hashicorp/serf This change means we support the latest release of Serf.
1 parent 08dd82c commit d120e9b

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ python:
88
- "2.7"
99
- "2.6"
1010
before_install:
11-
- wget https://releases.hashicorp.com/serf/0.6.4/serf_0.6.4_linux_amd64.zip
12-
- unzip serf_0.6.4_linux_amd64.zip
11+
- wget https://releases.hashicorp.com/serf/0.7.0/serf_0.7.0_linux_amd64.zip
12+
- unzip serf_0.7.0_linux_amd64.zip
1313
- ./serf agent &
1414
- sleep 1 ; ./serf tags -set foo=bar
1515
install:

tests/test_client.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,26 @@ def test_force_leaving_of_a_node(self, serf):
4444
{b'Error': b'', b'Seq': 1}
4545

4646
def test_joining_a_non_existent_node(self, serf):
47-
join = serf.join(['127.0.0.1:23000'])
47+
address = '127.0.0.1:23000'
48+
join = serf.join([address])
4849
assert join.head == \
49-
{b'Error': b'dial tcp 127.0.0.1:23000: connection refused',
50-
b'Seq': 1}
50+
{
51+
b'Error': 'dial tcp {addr}: getsockopt: {reason}'.format(
52+
addr=address,
53+
reason='connection refused'
54+
).encode('utf-8'),
55+
b'Seq': 1
56+
}
5157
assert join.body == {b'Num': 0}
5258

5359
def test_joining_an_existing_node_fails(self, serf):
5460
join = serf.join(['127.0.0.1:7373'])
55-
assert join.head == {b'Error': b'Reading remote state failed: EOF',
56-
b'Seq': 1}
61+
assert join.head == {b'Error': b'EOF', b'Seq': 1}
5762
assert join.body == {b'Num': 0}
5863

5964
def test_providing_a_single_value_should_put_it_inside_a_list(self, serf):
6065
join = serf.join('127.0.0.1:7373')
61-
assert join.head == {b'Error': b'Reading remote state failed: EOF',
62-
b'Seq': 1}
66+
assert join.head == {b'Error': b'EOF', b'Seq': 1}
6367
assert join.body == {b'Num': 0}
6468

6569
def test_member_list_is_not_empty(self, serf):

0 commit comments

Comments
 (0)