HomeClusterLabs Projects

Test: libcrmcommon: Add unit tests for pcmk__xml_find_x_0_schema_index.

Description

Test: libcrmcommon: Add unit tests for pcmk__xml_find_x_0_schema_index.

This requires making various things in the function conditional, which I
kind of hate. But, it all comes down to the fact that when we are
running for real, we're adding the pacemaker-next/none schemas with
crm_schema_init.

When we are unit testing, we aren't doing any of that. The only
"schemas" we have are the ones we are adding directly. So, the list has
two items fewer than the real function expects. I think this is okay
and doesn't totally invalidating the testing.

Details

Provenance
clumensAuthored on Nov 17 2023, 12:39 PM
Parents
rP1f48f8318e83: Refactor: libcrmcommon: Make various schema stuff non-static.
Branches
Unknown
Tags
Unknown