Runtime: reset stale Core baseline on upgrade

This commit is contained in:
faumaray committed 2026-07-26 18:11:28 +03:00
1 parent d002c528f5
commit fca26fd066
4 files changed
+51 -7

No files matched your search

+10
View File
@@ -34,6 +34,7 @@ namespace
int main()
{
using Echoion::Plugins::ShortUrl::ExternalShortener;
using Echoion::Plugins::ShortUrl::hasExternalConfiguration;
using Echoion::Plugins::ShortUrl::parseExternalConfig;
int failures{};
@@ -46,6 +47,15 @@ int main()
};
EnvironmentVariable token{"ECHOION_SHORTENER_TEST_TOKEN", "test secret"};
check(!hasExternalConfiguration(
R"JSON({"settings":{},"_host":{"stateDirectory":"/tmp"}})JSON"),
"empty host envelope did not keep the optional provider dormant");
check(
hasExternalConfiguration(R"JSON({"settings":{"endpoint":false}})JSON"),
"partially configured provider was incorrectly treated as dormant");
check(hasExternalConfiguration("{"),
"malformed provider configuration was incorrectly treated as "
"dormant");
const auto jsonConfig = R"JSON({
"endpoint":"https://short.example/api",
"method":"POST",