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

explicitly test the environments installed before and after remove

parent 84bb63d7
No related branches found
No related tags found
1 merge request!82Remove cmd
Pipeline #386393 passed
This commit is part of merge request !82. Comments created here will be created in the context of that merge request.
......@@ -759,9 +759,9 @@ def test_remove_package_sets(tmp_path, simple_toolchain):
release_dir = tmp_path / release_to_test / mod.get_native_microarchitecture()
assert len(list(release_dir.iterdir())) == 2 # spack and lmod
# check that the two toolchains are installed
assert (
len(list((release_dir / "spack" / "var" / "spack" / "environments").iterdir()))
== 2
environments_dir = release_dir / "spack" / "var" / "spack" / "environments"
set([environment.name for environment in environments_dir.iterdir()]) == set(
["toolchain1", "toolchain2"]
)
# check that the two toolchains have the "handmade" module files
toolchains_list = list(mod.environment_status(release_to_test, tmp_path).values())[
......@@ -781,11 +781,11 @@ def test_remove_package_sets(tmp_path, simple_toolchain):
package_sets=["toolchain2"],
force_remove=True,
)
# now check that only toolchain1 is installed
assert (
len(list((release_dir / "spack" / "var" / "spack" / "environments").iterdir()))
== 1
# now check that only "toolchain1" is installed in environments_dir
assert set([environment.name for environment in environments_dir.iterdir()]) == set(
["toolchain1"]
)
# check that the only one toolchains has the "handmade" module files
toolchains_list = list(mod.environment_status(release_to_test, tmp_path).values())[
0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment