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

update tests

parent 7493a95c
No related branches found
No related tags found
No related merge requests found
...@@ -490,7 +490,6 @@ def test_environment_status(tmp_path): ...@@ -490,7 +490,6 @@ def test_environment_status(tmp_path):
assert set(toolchain_map[microarch]) == set(expected_toolchain_map[microarch]) assert set(toolchain_map[microarch]) == set(expected_toolchain_map[microarch])
@pytest.mark.skip(reason="not implemented yet")
def test_remove_environment(tmp_path): def test_remove_environment(tmp_path):
"""Test that the remove_environment works as expected.""" """Test that the remove_environment works as expected."""
mpsd_release = "dev-23a" mpsd_release = "dev-23a"
...@@ -502,15 +501,18 @@ def test_remove_environment(tmp_path): ...@@ -502,15 +501,18 @@ def test_remove_environment(tmp_path):
# test removal without arguments (should sys.exit(1)) # test removal without arguments (should sys.exit(1))
create_fake_environment(tmp_path, mpsd_release) create_fake_environment(tmp_path, mpsd_release)
with pytest.raises(SystemExit): with pytest.raises(SystemExit) as pytest_wrapped_e:
mod.remove_environment(mpsd_release, tmp_path, force_remove=True) mod.remove_environment(mpsd_release, tmp_path, force_remove=True)
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 1
# test removal of the complete environment # test removal of the complete environment
create_fake_environment(tmp_path, mpsd_release)
mod.remove_environment(mpsd_release, tmp_path, ["ALL"], force_remove=True) mod.remove_environment(mpsd_release, tmp_path, ["ALL"], force_remove=True)
toolchain_map = mod.environment_status(mpsd_release, tmp_path) toolchain_map = mod.environment_status(mpsd_release, tmp_path)
assert toolchain_map is None assert toolchain_map is None
# ensure that logs folder remains # ensure that logs folder remains
logs_folder = tmp_path / mpsd_release / "logs" logs_folder = tmp_path / mpsd_release / mod.get_native_microarchitecture() / "logs"
assert logs_folder.exists() assert logs_folder.exists()
# test removal of a single toolchain # test removal of a single toolchain
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment