test(xcatd): cover per-element command-log redaction
Extract the secret set, the command maps and the redaction routines from xcatd.pm. Drive the real routines, because the module needs daemon dependencies that the test host does not have. Cover a multi-word value, a quoted value, spaces around the operator, the "+=", ",=", "^=", "!=", "=~" and "!~" operators, the community strings, a secret embedded in a compound argument with and without quotes, each Getopt::Long password option form with bundles, the "?" help letter, abbreviations, "+" prefixes and two-dash letters, values that hold another secret letter, non-secret compact values that a value option absorbs, long names that start with a secret letter, the mkvm case forms and compact values, the chvm positional passwords, the mkvm clone pw= operand, the vCenter cluster passwords, the snmpc site value through chdef and tabch with compound selectors, the authentication tokens, and the product keys. Assert that validate() redacts the argument vector, that the joined result runs through redact_password, and that the dispatch trace builds its text from redacted arguments. Keep every attribute and column pair from Schema.pm, so a removed table-qualified mapping fails the test.
V
Vinícius Ferrão committed
0d8d1e60ff1179fd12a880e15e0d60ed7197619e
Parent: 7fa7557