Skip to content

Commit

Permalink
Updating
Browse files Browse the repository at this point in the history
  • Loading branch information
jboucourt committed Aug 6, 2024
1 parent db0b201 commit 3394686
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion gestalt/vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ def worker(self, kube_token: Tuple) -> None: # type: ignore
while self._run_worker:
if kube_token:
token_type, token_id, token_duration = token = kube_token
print(f"Kube Token Values: {token_type}, {token_id}, {token_duration}")
if token_type == "kubernetes":
self.vault_client.auth.token.renew(token_id)
print("kubernetes token for the app has been renewed")
Expand Down
3 changes: 1 addition & 2 deletions tests/test_gestalt.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def except_once(self, **kwargs):

mock_k8s_renew.start.assert_called()

test_token = ("kubernetes", 1, 100)
test_token = ("dynamic", 1, 100)

with pytest.raises(RuntimeError):
v.worker(test_token)
Expand Down Expand Up @@ -612,7 +612,6 @@ def except_once(self, **kwargs):
with patch("gestalt.vault.hvac.Client") as mock_client:
v = Vault(role="test-role", jwt="test-jwt")
v.connect()
print(f"Run worker active: {v._run_worker}")

mock_k8s_renew.start.assert_called()

Expand Down

0 comments on commit 3394686

Please sign in to comment.