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
25b55e4a
Commit
25b55e4a
authored
1 year ago
by
Ashwin Kumar Karnad
Browse files
Options
Downloads
Patches
Plain Diff
update tests
parent
2c18dc5e
No related branches found
Branches containing commit
No related tags found
1 merge request
!118
add status command arguments
Pipeline
#387604
passed
1 year ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_mpsd_software.py
+23
-1
23 additions, 1 deletion
tests/test_mpsd_software.py
with
23 additions
and
1 deletion
tests/test_mpsd_software.py
+
23
−
1
View file @
25b55e4a
...
...
@@ -502,7 +502,26 @@ def create_fake_environment(tmp_path, mpsd_release, expected_toolchain_map=None)
def
test_environment_status
(
tmp_path
):
"""
Test that the environment status is correct.
"""
"""
Test that the environment status is correct.
The status command has the following three usage:
- 1) If no mpsd_release, list available releases
- 2) If mpsd_release, list available toolchains
- 3) If mpsd_release and toolchain, list available packages
We need to test all the three cases.
"""
# 1) If no mpsd_release, list available releases
list_of_release_in_empty_dir
=
mod
.
environment_status
(
None
,
tmp_path
)
assert
list_of_release_in_empty_dir
==
[]
(
tmp_path
/
"
test_case1
"
/
"
dev-23a
"
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
(
tmp_path
/
"
test_case1
"
/
"
fake_release
"
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
list_of_release
=
mod
.
environment_status
(
None
,
tmp_path
/
"
test_case1
"
)
assert
list_of_release
==
[
"
dev-23a
"
]
# 2) If mpsd_release, list available toolchains
toolchain_map
=
mod
.
environment_status
(
"
fake-release
"
,
tmp_path
)
assert
toolchain_map
is
None
mpsd_release
=
"
dev-23a
"
...
...
@@ -513,6 +532,9 @@ def test_environment_status(tmp_path):
for
microarch
in
expected_toolchain_map
.
keys
():
assert
set
(
toolchain_map
[
microarch
])
==
set
(
expected_toolchain_map
[
microarch
])
# 3) If mpsd_release and toolchain, list available packages
# TODO this test has to be written after the MR from remove mcd is merged
def
test_initialise_environment
(
tmp_path
):
"""
Test that init_file is created as expected.
"""
...
...
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