1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-07 00:35:37 +02:00

Remove indexed option constants.

These constants don't scale well as the index total is increased for an option.

The core code rarely uses these options and they are easily replaced with cfgOptionName().

The tests had started to make use of the constants, so provide functions that build the option name from the optionId and, optionally, the optionKey.
This commit is contained in:
David Steele
2020-10-19 14:03:48 -04:00
parent 86275c4f85
commit 7d069a2b91
30 changed files with 1080 additions and 1325 deletions

View File

@ -317,8 +317,8 @@ testRun(void)
argList = strLstNew();
strLstAdd(argList, stanzaOpt);
strLstAdd(argList, pg1PathOpt);
strLstAddZ(argList, "--pg5-host=localhost");
strLstAddZ(argList, "--" CFGOPT_PG5_HOST_CMD "=pgbackrest-bogus");
hrnCfgArgKeyRawZ(argList, cfgOptPgHost, 5, "localhost");
hrnCfgArgKeyRawZ(argList, cfgOptPgHostCmd, 5, "pgbackrest-bogus");
strLstAddZ(argList, "--pg5-path=/path/to/pg5");
strLstAdd(argList, strNewFmt("--pg5-host-user=%s", testUser()));
harnessCfgLoad(cfgCmdCheck, argList);