File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,7 +104,8 @@ def add_with_dependencies(
104104 name = module ["name" ]
105105 assert "steps" in module
106106 if self ._module_is_in_build (module ):
107- print ("Skipping already added module '%s'" % name )
107+ if is_module_added_manually (str_added_by ):
108+ print ("Skipping already added module '%s'" % name )
108109 return
109110 if "dependencies" in module :
110111 for dep in module ["dependencies" ]:
Original file line number Diff line number Diff line change 1+ set -e
2+ set -x
3+ cd tests/
4+ mkdir -p ./tmp/
5+ cd ./tmp/
6+ touch cfbs.json && rm cfbs.json
7+ rm -rf .git
8+
9+ cfbs --non-interactive init
10+
11+ cfbs --non-interactive add https://github.com/cfengine/test-cfbs-static-repo > output.log 2>&1
12+
13+ # All four modules were correctly added
14+ grep -F " Added module: test-library-parsed-local-users" ./output.log
15+ grep -F " Added module: test-library-parsed-etc-group" ./output.log
16+ grep -F " Added module: test-inventory-local-groups" ./output.log
17+ grep -F " Added module: test-inventory-local-users" ./output.log
18+
19+ # Adding modules together with their dependencies should not display skipping messages (CFE-3841):
20+ ! ( grep -F " Skipping already added" ./output.log )
21+
Original file line number Diff line number Diff line change @@ -44,5 +44,6 @@ bash tests/shell/037_cfbs_validate.sh
4444bash tests/shell/038_global_dir.sh
4545bash tests/shell/039_add_added_by_field_update_1.sh
4646bash tests/shell/040_add_added_by_field_update_2.sh
47+ bash tests/shell/041_add_multidep.sh
4748
4849echo " All cfbs shell tests completed successfully!"
You can’t perform that action at this time.
0 commit comments