Skip to content
Snippets Groups Projects
Commit f7e78df0 authored by Ashwin Kumar Karnad's avatar Ashwin Kumar Karnad
Browse files

add test to check that version is logged

parent 50214580
No related branches found
No related tags found
1 merge request!77Skip logging script commit hash
Pipeline #372722 failed
...@@ -169,6 +169,7 @@ def test_record_script_execution_summary(tmp_path): ...@@ -169,6 +169,7 @@ def test_record_script_execution_summary(tmp_path):
root_dir = tmp_path / "test_prepare_env" root_dir = tmp_path / "test_prepare_env"
mpsd_release_to_test = "dev-23a" mpsd_release_to_test = "dev-23a"
script_version = mod.__version__
if os.path.exists(root_dir / cmd_log_file): if os.path.exists(root_dir / cmd_log_file):
initial_bytes = os.path.getsize(cmd_log_file) initial_bytes = os.path.getsize(cmd_log_file)
else: else:
...@@ -184,8 +185,10 @@ def test_record_script_execution_summary(tmp_path): ...@@ -184,8 +185,10 @@ def test_record_script_execution_summary(tmp_path):
# Check that the log file has "Spack environments branch: dev-23a " in the last line # Check that the log file has "Spack environments branch: dev-23a " in the last line
with open(root_dir / cmd_log_file, "r") as f: with open(root_dir / cmd_log_file, "r") as f:
last_line = f.readlines()[-1] lines = f.readlines()
assert "Spack environments branch: dev-23a " in last_line assert "Spack environments branch: dev-23a " in lines[-1]
assert f"MPSD Software manager version: {script_version}" in lines[-2]
def test_install_environment_wrong_package_set(tmp_path): def test_install_environment_wrong_package_set(tmp_path):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment