Skip to content

Bootstrap a unit-test suite (tests/unit) for the dtc plugins #818

Description

@dacasti2mx

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.

Metadata

Metadata

Assignees

Labels

0.8.1Release 0.8.1refactorCode change that neither fixes a bug nor adds a feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions