ci(molecule): rename the run script after the molecule-controller image

scripts/run_molecule_in_ci_image.sh runs inside the molecule-controller
image, not the ci image, so its name pointed readers at the wrong image.
Its test file and class follow, and every reference is updated. ADR 0003
keeps the old name: it records what that change touched.

main's selector sees the old and the new path (it diffs with
--no-renames) and neither is on IGNORED, so this pull request runs every
scenario through the renamed script of its own checkout.

Assisted-by: Claude Code
This commit is contained in:
Defame1297 committed 2026-12-02 08:27:57 +00:00
1 parent 08c589e910
commit 3414880d05
7 files changed
+10 -10

No files matched your search

@@ -1,6 +1,6 @@
# SPDX-FileCopyrightText: Defame1297 and contributors
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for scripts/run_molecule_in_ci_image.sh with stub tools in place of the molecule-controller
"""Tests for scripts/run_molecule_in_controller.sh with stub tools in place of the molecule-controller
image's.
Run with: python3 -m unittest discover -s tests/scripts
@@ -14,7 +14,7 @@ import tempfile
import unittest
REPO = pathlib.Path(__file__).resolve().parents[2]
SCRIPT = REPO / "scripts" / "run_molecule_in_ci_image.sh"
SCRIPT = REPO / "scripts" / "run_molecule_in_controller.sh"
# Each stub appends its name, arguments and the paths it saw to STUB_LOG; STUB_FAIL_<name> fails it.
STUB = """#!/usr/bin/env bash
@@ -50,7 +50,7 @@ echo "runner args=$* path=$PATH acp=$ANSIBLE_COLLECTIONS_PATH" \\
@unittest.skipUnless(shutil.which("bash"), "bash is required")
class RunMoleculeInCiImageTest(unittest.TestCase):
class RunMoleculeInControllerTest(unittest.TestCase):
def setUp(self):
self.tmp = pathlib.Path(tempfile.mkdtemp(prefix="kamino-runci-")).resolve()
self.addCleanup(shutil.rmtree, self.tmp, True)
+1 -1
View File
@@ -616,7 +616,7 @@ class WorkflowJobsTest(unittest.TestCase):
self.assertEqual(
step["env"]["SELECTED"], "${{ needs.select.outputs.scenarios }}"
)
self.assertIn('run_molecule_in_ci_image.sh <<< "$SELECTED"', step["run"])
self.assertIn('run_molecule_in_controller.sh <<< "$SELECTED"', step["run"])
def test_the_result_runs_whatever_the_others_ended_as(self):
job = self.JOBS["result"]