You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-03 00:26:59 +02:00
Validate configuration options in a single pass.
By pre-calculating and storing the option dependencies in parse.auto.c validation can be completed in a single pass, which is both simpler and faster.
This commit is contained in:
@ -552,6 +552,10 @@ testRun(void)
|
||||
StringList *argList = NULL;
|
||||
String *configFile = strNewFmt("%s/test.config", testPath());
|
||||
|
||||
TEST_RESULT_INT(
|
||||
sizeof(optionResolveOrder) / sizeof(ConfigOption), CFG_OPTION_TOTAL,
|
||||
"check that the option resolve list contains an entry for every option");
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
argList = strLstNew();
|
||||
strLstAdd(argList, strNew(TEST_BACKREST_EXE));
|
||||
@ -718,6 +722,8 @@ testRun(void)
|
||||
strLstAdd(argList, strNew("--stanza=db"));
|
||||
strLstAdd(argList, strNew("--repo1-type=s3"));
|
||||
strLstAdd(argList, strNew("--repo1-s3-key=xxx"));
|
||||
strLstAdd(argList, strNew("--repo1-s3-bucket=xxx"));
|
||||
strLstAdd(argList, strNew("--repo1-s3-endpoint=xxx"));
|
||||
strLstAdd(argList, strNew(TEST_COMMAND_BACKUP));
|
||||
TEST_ERROR(
|
||||
configParse(strLstSize(argList), strLstPtr(argList), false), OptionInvalidError,
|
||||
|
Reference in New Issue
Block a user