Skip to content

Commit b51ffc3

Browse files
committed
Add check completed output
Output check completed after a check to make it clearer what was done Fixes #15
1 parent f42cb11 commit b51ffc3

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

hsm_orchestrator/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ def check_update_cnf_file(self) -> None:
355355
self.check_update_ca_crt()
356356
self.check_update_unique_subject()
357357
self.check_ca_files()
358+
print("Check completed.")
358359

359360
def check_environment(self, skip_git_fetch: bool) -> None:
360361
"""Validate the git environment and prepare for CSR processing.

tests/test_check.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,3 +776,21 @@ def test_missing_database(tmp_path, datafiles, monkeypatch):
776776
result.output,
777777
)
778778
assert result.exit_code == 1
779+
780+
781+
@pytest.mark.datafiles(FIXTURE_DIR / "example.csr", FIXTURE_DIR / "example.cnf")
782+
def test_check(tmp_path, datafiles, monkeypatch):
783+
runner = CliRunner()
784+
with runner.isolated_filesystem(tmp_path):
785+
env = set_up_environment(tmp_path, datafiles, monkeypatch)
786+
shutil.copy2(Path(datafiles / "example.cnf"), env["cnf_file"])
787+
result = runner.invoke(
788+
main,
789+
["check", "--skip-git-fetch", "--config", env["orchestrator_config_file"]],
790+
input="",
791+
)
792+
re_search(
793+
r"Check completed\.",
794+
result.output,
795+
)
796+
assert result.exit_code == 0

0 commit comments

Comments
 (0)