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
fb542664
Commit
fb542664
authored
1 year ago
by
Ashwin Kumar Karnad
Browse files
Options
Downloads
Patches
Plain Diff
Refactor test_remove_environment function to use get_important_folders utility
parent
70a37ccb
No related branches found
No related tags found
1 merge request
!130
Resolve "single function to generate all the folders relative to root_dir"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_remove.py
+5
-4
5 additions, 4 deletions
tests/test_remove.py
with
5 additions
and
4 deletions
tests/test_remove.py
+
5
−
4
View file @
fb542664
...
...
@@ -32,8 +32,9 @@ def test_remove_environment(tmp_path, mocker, create_fake_environment):
# check that the release directory is removed and logs are kept
# create a release directory
create_fake_environment
(
tmp_path
,
release_to_test
)
release_dir
=
tmp_path
/
release_to_test
/
remove
.
get_native_microarchitecture
()
logs_dir
=
tmp_path
/
release_to_test
/
"
logs
"
folders
=
mpsd_software_manager
.
utils
.
filesystem_utils
.
get_important_folders
(
release_to_test
,
tmp_path
)
toolchain_map
=
mpsd_software_manager
.
cmds
.
status
.
environment_status
(
release_to_test
,
tmp_path
...
...
@@ -47,9 +48,9 @@ def test_remove_environment(tmp_path, mocker, create_fake_environment):
# check that no toolchain remains
assert
toolchain_map
is
None
# check that the release directory is empty
assert
len
(
list
(
release_dir
.
iterdir
()))
==
0
assert
len
(
list
(
folders
[
"
release_dir
"
]
.
iterdir
()))
==
0
# check that the logs directory is non-empty
list_of_logs
=
list
(
logs_dir
.
iterdir
())
list_of_logs
=
list
(
folders
[
"
logs_dir
"
]
.
iterdir
())
assert
len
(
list_of_logs
)
==
2
# APEX + remove_build_log
# check that one of the log has 'remove.log' as part of the name
assert
"
BUILD_ALL_remove.log
"
in
"
,
"
.
join
([
str
(
x
)
for
x
in
list_of_logs
])
...
...
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