Summary
The collection has no unit-test harness. CI currently runs only build,
sanity, and lint (.github/workflows/main.yml). Some plugin-level behaviors
(for example, the config-save error policy) can only be tested
deterministically with unit tests and mocks — the live-NDFC integration
tests cannot reproduce them reliably.
Scope
- Add a
tests/unit/ layout following the ansible-test units convention.
- Add the CI job, Python dependencies, and Ansible mocking needed to run it.
- Document how to run the suite locally.
First case to cover: #813 (non-fatal config-save policy)
- 500 ->
fabric_deploy_manager returns failed=True with the response intact
- 500 ->
pipeline_base._config_save returns non-fatal
- 400 -> fatal
- missing/malformed
msg -> fatal
- 200 -> ok
Context: the fix for #813 was verified locally with a temporary mock
harness. This issue tracks turning that into a permanent, CI-run test.
Summary
The collection has no unit-test harness. CI currently runs only build,
sanity, and lint (
.github/workflows/main.yml). Some plugin-level behaviors(for example, the config-save error policy) can only be tested
deterministically with unit tests and mocks — the live-NDFC integration
tests cannot reproduce them reliably.
Scope
tests/unit/layout following theansible-test unitsconvention.First case to cover: #813 (non-fatal config-save policy)
fabric_deploy_managerreturnsfailed=Truewith the response intactpipeline_base._config_savereturns non-fatalmsg-> fatalContext: the fix for #813 was verified locally with a temporary mock
harness. This issue tracks turning that into a permanent, CI-run test.