aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/molecule/default/tests/test_yaml_strategy.py
Commit message (Collapse)AuthorAgeFilesLines
* test: expand Molecule coverage for exporter behaviorColin Wilk2026-07-211-0/+51
| | | | | | | | | | | | Cover lineinfile and YAML behavior for default exporters, skipped defaults, exporters without IDs, duplicate definitions, path and host overrides, path-prefix precedence, and inherited label overrides. Verify YAML handling of null documents, multiple files, labeled and unlabeled groups, and duplicate targets. Add test coverage for command and shell handlers using run-once, per-host, disabled, and non-become configurations.
* fix: prevent lost YAML targets during parallel writesColin Wilk2026-07-211-0/+17
| | | | | | | | | | | | | | | | | | | | The YAML strategy performed a separate read-modify-write operation for every managed host. Because these tasks were delegated to the same Prometheus host, parallel Ansible forks could read the same original file before any fork wrote its update. Each fork then generated YAML containing only its own target. Although the copy module atomically replaced the file, it did not make the full read-modify-write sequence atomic. The last fork to write therefore overwrote targets added by earlier forks. Collect exporter updates from all hosts through hostvars, process them in one run_once operation, and write each distinct target file once. This preserves every target without requiring users to set serial. Add parallel coverage for multiple target files and label groups, and reset the fixtures on every convergence so stale files cannot hide the race.
* test: split tests by strategyColin Wilk2026-07-211-0/+139