Skip to content

Commit

Permalink
Fix seal_status Call (hvac#354)
Browse files Browse the repository at this point in the history
* Add regression tests

* Fix seal_status call

* More meaningful assertion
  • Loading branch information
jeffwecan authored and Jeffrey Hogan committed Dec 19, 2018
1 parent dc01d71 commit b717a0e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hvac/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def seal_status(self):
:return: The JSON response of the request.
:rtype: dict
"""
return self.read_seal_status()
return self.sys.read_seal_status()

def read(self, path, wrap_ttl=None):
"""GET /<path>
Expand Down
12 changes: 10 additions & 2 deletions tests/integration_tests/v1/test_integration.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from unittest import TestCase
from unittest import skipIf
import logging
from unittest import TestCase, skipIf

from hvac import exceptions
from tests import utils
Expand Down Expand Up @@ -1069,3 +1069,11 @@ def test_auth_kubernetes(self):

# Reset integration test state
self.client.disable_auth_backend(mount_point=test_mount_point)

def test_seal_status(self):
seal_status_property = self.client.seal_status
logging.debug('seal_status_property: %s' % seal_status_property)
self.assertIn(
member='sealed',
container=seal_status_property,
)

0 comments on commit b717a0e

Please sign in to comment.