Cover the packaging rules that keep a locally modified xcat.conf across
an upgrade, for the management-node and service-node specs alike: both
active paths owned as %config(noreplace), the build-time selection of
the Apache 2.4 source into the active payload, %post no longer removing
or overwriting the active file, and the migration living in %pretrans,
returning early on a fresh install, accepting only a regular file, and
removing it only when its contents still match a saved template.
The assertions pin the ordering of those guards instead of searching for
isolated tokens, so moving the migration back to %pre or letting it
delete a customised file fails the test.
Drive the routine with an InfiniBand name first, last and alone, and with a
name that has none, so a test that only reads the last name does not return.
Drive the routine that makes the InfiniBand address and make sure that it
gives the port GUID of the two adapters that this was validated with, and that
it gives nothing for an address that is not a six byte ethernet mac.
Pin that the second entry waits for an ethernet node whose network an IPoIB
interface serves, that it carries hardware type 32 and the derived address,
that it does not take the place of the entry of the node, and that removing
the node removes it by name and by address.
Add a unit test for the routine that makes the port part of a URL. The test
lifts the routine out of the module source, because the module needs a
database to load.
The test shows that the default port gives no text, that another port gives
a colon and the port, and that a port that is not set gives no text. It also
shows that the four places that write a URL read the port through the
routine.
Extract secret_in_request, secret_in_response and the secret sets from
xcatd.pm, because the classifier and the finalizer consult them. Cover
the authentication key, the privacy key and the snmpc site value reads
as sensitive, the token, prodkey and site table dumps as sensitive, the
nodels expansion of a secret table as sensitive, the lsvm directory
listing as sensitive, and the implicit lsdef attribute listing as
redacted. Keep a plain site value, a benign table,
a benign object listing and a group named like a table as not
sensitive. Assert that the daemon redacts each request segment alone.
Build a medium for each CentOS Linux 8 release from the package names that
the release gives, and make sure that copycds finds the minor version.
Pin the behaviour when the medium gives no release package, and make sure
that a package with the same centos-release prefix, or a package for a
different major version, does not give a version. Pin that a medium that
names two minor versions keeps the unversioned name. Pin that CentOS Stream,
Rocky Linux, AlmaLinux, Red Hat Enterprise Linux and Oracle Linux keep
their own branches.