Skip to content

Commit

Permalink
add tests for is_initialized action
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd committed Jan 27, 2021
1 parent 7a5a2c5 commit f4e05cf
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/test_action_is_initialized.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
class IsInitializedActionTestCase(VaultActionTestCase):
action_cls = VaultIsInitializedAction

def test_method(self):
def test_already_initialized(self):
action = self.get_action_instance(config=self.dummy_pack_config)
result = action.run()
assert result is True

def test_before_and_after_initialization(self):
self.manager.restart_vault_cluster(perform_init=False)

action = self.get_action_instance(config=self.dummy_pack_config)
result = action.run()
assert result is False

self.manager.restart_vault_cluster(perform_init=True)

action = self.get_action_instance(config=self.dummy_pack_config)
result = action.run()
assert result is True

0 comments on commit f4e05cf

Please sign in to comment.