HomeClusterLabs Projects

Refactor: cts: Change crm_error tests to make them easier to work with.
bdef412fbd15Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Refactor: cts: Change crm_error tests to make them easier to work with.

The end goal of this set of patches is to get rid of the
apply_substutitions function, which means we need to get rid of {fmt}
from every string and just have make_test_group() append the format
automatically.

There's a handful of strings where this is impossible, all of which are
in crm_error because of its use of "--". We can't just append
"--output-as=" after the "--" because it will be interpreted as a return
code instead of a command line argument. At the same time, we need "--"
because some of the test commands pass crm_error a negative error code
and they'll be interpreted as options without it.

So, we can do two things. First, if we absolutely have to use "--",
just don't use make_test_group() anymore. We can just run with text
output and that's probably fine. Second, we can change some of the test
commands to not use negative error codes.

Details

Provenance
clumensAuthored on Apr 1 2025, 2:24 PM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.