have test expose bug in unique_service()

This commit is contained in:
Noah Levitt 2017-05-26 14:48:18 -07:00
parent 9194085d0c
commit 492c97ad31

View File

@ -61,12 +61,14 @@ def test_unique_service(rr):
svc01 = { svc01 = {
"role": "example-role", "role": "example-role",
"ttl": 1.2, "ttl": 1.2,
"node": "test01.example.com" "node": "test01.example.com",
"foo": "bar",
} }
svc02 = { svc02 = {
"role": "example-role", "role": "example-role",
"ttl": 1.2, "ttl": 1.2,
"node": "test02.example.com" "node": "test02.example.com",
"baz": "quux",
} }
# register svc01. output should be svc01. # register svc01. output should be svc01.
output = svcreg.unique_service('example-role', candidate=svc01) output = svcreg.unique_service('example-role', candidate=svc01)
@ -84,7 +86,6 @@ def test_unique_service(rr):
assert output3['last_heartbeat'] > output1['last_heartbeat'] assert output3['last_heartbeat'] > output1['last_heartbeat']
svcreg.unregister('example-role') svcreg.unregister('example-role')
def test_service_registry(rr): def test_service_registry(rr):
svcreg = doublethink.ServiceRegistry(rr) svcreg = doublethink.ServiceRegistry(rr)
# missing required fields # missing required fields