ci(molecule): select no scenario for a galaxy.yml change, guarded by a load check
Scenarios load mortis.kamino from the checkout, not the copy molecule installs from galaxy.yml, so galaxy.yml goes on the selector's IGNORED list. A new check, run by run_molecule_in_ci_image.sh before the scenarios, fails the run when the environment molecule gives ansible-playbook would resolve the collection anywhere else. Closes #355 Assisted-by: Claude Code
This commit is contained in:
1 parent
fcd331be06
commit
03b21a9aef
7 files changed
+274
-5
No files matched your search
@@ -210,9 +210,14 @@ class SelectTest(unittest.TestCase):
|
||||
chosen, _reason = self.select(["docs/x.md", "roles/docker/tasks/main.yml"])
|
||||
self.assertEqual(chosen, ["roles/docker/molecule/default"])
|
||||
|
||||
def test_galaxy_yml_selects_nothing_and_does_not_mask_a_role(self):
|
||||
chosen, _reason = self.select(["galaxy.yml"])
|
||||
self.assertEqual(chosen, [])
|
||||
chosen, _reason = self.select(["galaxy.yml", "roles/docker/tasks/main.yml"])
|
||||
self.assertEqual(chosen, ["roles/docker/molecule/default"])
|
||||
|
||||
def test_anything_else_selects_everything(self):
|
||||
for path in (
|
||||
"galaxy.yml",
|
||||
"meta/runtime.yml",
|
||||
"plugins/modules/x.py",
|
||||
"extensions/molecule/requirements.yml",
|
||||
|
||||
Reference in new issue
Block a user