Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mpsd-software-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MPSD Computational Science
mpsd-software-manager
Commits
be99d8de
Commit
be99d8de
authored
1 year ago
by
Ashwin Kumar Karnad
Browse files
Options
Downloads
Patches
Plain Diff
update tests
parent
7493a95c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_mpsd_software.py
+5
-3
5 additions, 3 deletions
tests/test_mpsd_software.py
with
5 additions
and
3 deletions
tests/test_mpsd_software.py
+
5
−
3
View file @
be99d8de
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment