test(molecule): derive the order test from the duration list
Part of #432. The start-order test now reads its scenarios and their seconds from the run script's list, so a refreshed list does not break it; the empty-lanes test only asserts the value is accepted, and the script's header and duration-list comments are rewrapped and say the list is keyed by scenario directory. Assisted-by: Claude Code
This commit is contained in:
1 parent
ef840c8952
commit
e34a0eb2e0
2 files changed
+33
-23
No files matched your search
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# The Molecule workflow's "Run the scenarios" step: `molecule test` for each scenario directory on
|
||||
# stdin, MOLECULE_LANES (default 4, also when empty) at a time, longest first, each with its own log and ANSIBLE_HOME under
|
||||
# <work-dir>/<n>/ (no collection is installed there: .config/molecule/config.yml sets prerun false).
|
||||
# stdin, MOLECULE_LANES (default 4, also when empty) at a time, longest first, each with its own
|
||||
# log and ANSIBLE_HOME under <work-dir>/<n>/ (no collection is installed there:
|
||||
# .config/molecule/config.yml sets prerun false).
|
||||
# Exit 1 on a failure.
|
||||
#
|
||||
# scripts/run_molecule_scenarios.sh <work-dir> < scenario-dirs
|
||||
@@ -78,8 +79,9 @@ done
|
||||
mkdir -p "$work"
|
||||
|
||||
# Seconds each scenario took in the last full run, so the longest start first and none started
|
||||
# late sets the end of the run. Refresh from a full run's `finished <label>: exit 0 after S s`
|
||||
# lines; a scenario missing here is assumed long and starts first.
|
||||
# late sets the end of the run. Keyed by scenario directory, not label: refresh from a full run's
|
||||
# `finished <label>: exit 0 after S s` lines, each label mapped back to its directory. A scenario
|
||||
# missing here is assumed long and starts first.
|
||||
declare -A last_seconds=(
|
||||
[roles/system_baseline/molecule/default]=1127
|
||||
[roles/ufw/molecule/default]=907
|
||||
|
||||
Reference in new issue
Block a user