fix: Array parsing in new config (#1884)

Fixes #1870.
This commit is contained in:
Sergey Kuznetsov
2025-02-12 13:28:06 +00:00
committed by GitHub
parent cd1aa8fb70
commit e503dffc9a
12 changed files with 818 additions and 191 deletions

View File

@@ -89,9 +89,9 @@ TEST_F(JsonFromTempFile, validateArrayValue)
EXPECT_EQ("204.2.2.1", std::get<std::string>(whitelistArr.at(1)));
}
struct JsonValueDeathTest : JsonFromTempFile {};
struct ConfigValueJsonGetArrayDeathTest : JsonFromTempFile {};
TEST_F(JsonValueDeathTest, invalidGetValues)
TEST_F(ConfigValueJsonGetArrayDeathTest, invalidGetValues)
{
// not possible for json value to call a value that doesn't exist
EXPECT_DEATH([[maybe_unused]] auto a = jsonFileObj.getArray("header.text1"), ".*");