-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix private key generation * add missing _on_upgrade * linting * fix race condition in privkey generation (#76) * fix race condition in privkey generation * fix static checks in other libs * tox fmt * update LIBPATCH --------- Co-authored-by: Luca Bello <[email protected]>
- Loading branch information
1 parent
b170b67
commit 9e6e040
Showing
4 changed files
with
57 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2024 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
|
||
"""Helper functions for writing tests.""" | ||
|
||
import subprocess | ||
|
||
from pytest_operator.plugin import OpsTest | ||
|
||
|
||
def get_secret(ops_test: OpsTest, app_name: str, path: str) -> str: | ||
return subprocess.check_output( | ||
[ | ||
"juju", | ||
"ssh", | ||
"--model", | ||
ops_test.model_full_name, | ||
"--container", | ||
"httpbin", | ||
f"{app_name}/0", | ||
"cat", | ||
path, | ||
] | ||
).decode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters