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
f7e78df0
Commit
f7e78df0
authored
1 year ago
by
Ashwin Kumar Karnad
Browse files
Options
Downloads
Patches
Plain Diff
add test to check that version is logged
parent
50214580
No related branches found
No related tags found
1 merge request
!77
Skip logging script commit hash
Pipeline
#372722
failed
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
+5
-2
5 additions, 2 deletions
tests/test_mpsd_software.py
with
5 additions
and
2 deletions
tests/test_mpsd_software.py
+
5
−
2
View file @
f7e78df0
...
@@ -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
):
...
...
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