Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnoone committed Jul 10, 2015
1 parent 663ea49 commit 03e1bfb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion aiovault/v1/sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def leader(self):
return HighAvailibility(**result)

@task
def health(self):
def health(self, *, standbyok=False):
"""Returns the health status of Vault.
This matches the semantics of a Consul HTTP health check and
Expand All @@ -82,6 +82,8 @@ def health(self):
"""
method = 'GET'
path = '/sys/health'
if standbyok:
path += '?standbyok'

response = yield from self.req_handler(method, path)
result = yield from response.json()
Expand Down
4 changes: 3 additions & 1 deletion tests/test_consul.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def test_lease(dev_server, consul):
token=consul.acl_master_token)
assert configured

configured = yield from store.write_role('foo', policy=CONSUL_POLICY, lease='6h')
configured = yield from store.write_role('foo',
policy=CONSUL_POLICY,
lease='6h')
assert configured

role = yield from store.read_role('foo')
Expand Down
2 changes: 0 additions & 2 deletions tests/test_transit.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def test_basic(dev_server):
assert policy['name'] == 'test'
assert policy['derived'] is False


policy = yield from backend.read_raw('test')
assert policy['name'] == 'test'
assert policy['derived'] is False
Expand Down Expand Up @@ -83,7 +82,6 @@ def test_derived(dev_server):
assert policy['name'] == 'test'
assert policy['derived'] is True


policy = yield from backend.read_raw('test')
assert policy['name'] == 'test'
assert policy['derived'] is True
Expand Down

0 comments on commit 03e1bfb

Please sign in to comment.