HomeClusterLabs Projects

Refactor: test: Add CIB-related single unit test setup code.

Description

Refactor: test: Add CIB-related single unit test setup code.

This function takes a CIB input file and copies it to a temp location so
the unit test can modify it, without modifying the original. This lets
multiple unit tests start with the same CIB and do whatever they need
without interfering with later tests.

This is not the complete setup function - you should call this from
whatever setup function you have in your unit tests. Making a truly
generic setup function is difficult because it requires passing a state
object around, which could vary between unit test groups. Splitting
this part out gets us most of the way there.

Details

Provenance
clumensAuthored on Feb 28 2024, 5:13 PM
Parents
rP3d21396d702c: Refactor: test: Add CIB-related unit test group setup code.
Branches
Unknown
Tags
Unknown