HomeClusterLabs Projects

Test: cts-cli: overhaul crm_shadow reset tests

Description

Test: cts-cli: overhaul crm_shadow reset tests

This corrects a number of issues with the crm_shadow --reset tests:

  • Improve test descriptions
  • The reset_N_tests lists are each used in a ShadowTestGroup with particular environment variable value set. Previously, some individual tests overrode those values, which was just confusing. Just move those tests to the proper list with the desired values. In particular, "Reset shadow instance" was moved from create_2_tests to reset_1_tests, "Reset shadow instance (no active instance)" was moved from reset_1_tests to reset_2_tests, the two "Reset shadow instance (mismatch)" tests were moved from reset_2_tests to reset_3_tests, and the two "Reset shadow instance (nonexistent shadow file)" tests were moved from reset_4_tests to reset_1_tests.
  • Previously, the shadow CIB was reset with text output then immediately reset with XML output. That's not a good test because there are no changes to reset in the XML case. Reset with text output, make a change, then reset with XML output.
  • Conversely, if the same command is run with text and then immediately with XML output with no changes in between, use make_test_group() to simplify.
  • create_empty defaults to True for ShadowTestGroup, so there's no need to specify it explicitly.

Details

Provenance
kgaillotAuthored on Tue, Oct 1, 6:21 PM
Parents
rP262b3136cb51: Doc: Pacemaker Explained: document custom recurring operations
Branches
Unknown
Tags
Unknown