-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add basic sanity test for upgrade
Signed-off-by: Niladri Halder <[email protected]>
- Loading branch information
Showing
14 changed files
with
518 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 |
---|---|---|
|
@@ -22,5 +22,6 @@ __pycache__ | |
/kubectl-plugin | ||
|
||
# Pytest assets | ||
/test-bin-* | ||
/test-dir-* | ||
tests/bdd/venv | ||
pytest.log |
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,7 @@ | ||
[pytest] | ||
log_cli = true | ||
log_cli_level = INFO | ||
log_cli_format = %(asctime)s [%(levelname)s] %(message)s | ||
log_cli_date_format = %Y-%m-%d %H:%M:%S | ||
log_file = pytest.log | ||
log_file_level = DEBUG |
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
Empty file.
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,17 @@ | ||
import logging | ||
import os | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def get_env(variable: str): | ||
try: | ||
value = os.getenv(variable) | ||
if len(value) == 0: | ||
raise ValueError("Env {variable} is empty") | ||
logger.info(f"Found env {variable}={value}") | ||
return value | ||
|
||
except Exception as e: | ||
logger.error(f"Failed to get env {variable}: {e}") | ||
return None |
Oops, something went wrong.