Enforce signed licenses and seamless track handoff
Independent component release / publish (push) Failing after 11s
Independent component release / publish (push) Failing after 11s
This commit is contained in:
15 files changed
+1367
-98
No files matched your search
@@ -50,7 +50,12 @@ int main()
|
||||
"level": "verbose",
|
||||
"fileName": "../outside.log",
|
||||
"maxFileSizeBytes": 1,
|
||||
"maxFiles": 0
|
||||
"maxFiles": 0,
|
||||
"format": "xml",
|
||||
"pattern": "",
|
||||
"mode": "parallel",
|
||||
"queueCapacity": 1,
|
||||
"overflowPolicy": "discard"
|
||||
}
|
||||
})");
|
||||
expect(logging.has_value(), "logging configuration parses");
|
||||
@@ -63,12 +68,49 @@ int main()
|
||||
"log size is clamped to a safe minimum");
|
||||
expect(logging->logging.maxFiles == 1,
|
||||
"at least one rolled log is retained");
|
||||
expect(logging->logging.format == "pattern" &&
|
||||
!logging->logging.pattern.empty(),
|
||||
"invalid formatter configuration is normalized");
|
||||
expect(logging->logging.mode == "async" &&
|
||||
logging->logging.queueCapacity == 16 &&
|
||||
logging->logging.overflowPolicy == "block",
|
||||
"invalid dispatch configuration is normalized");
|
||||
}
|
||||
const auto parentLog =
|
||||
ConfigLoader::loadFromJson(R"({"logging":{"fileName":".."}})");
|
||||
expect(parentLog && parentLog->logging.fileName == "echoion.log",
|
||||
"parent-directory logging filename is normalized");
|
||||
|
||||
const auto licensing = ConfigLoader::loadFromJson(R"({
|
||||
"licensing": {
|
||||
"required": true,
|
||||
"serviceUrl": "http://downgrade.example",
|
||||
"productId": "",
|
||||
"activationTokenEnv": "",
|
||||
"refreshInterval": "1m",
|
||||
"retryInterval": "1s",
|
||||
"maximumLeaseLifetime": "72h"
|
||||
}
|
||||
})");
|
||||
expect(licensing.has_value(), "licensing configuration parses");
|
||||
if (licensing) {
|
||||
expect(licensing->licensing.required,
|
||||
"licensing required flag is preserved");
|
||||
expect(licensing->licensing.serviceUrl.empty(),
|
||||
"licensing service cannot downgrade from HTTPS");
|
||||
expect(licensing->licensing.productId == "echoion" &&
|
||||
licensing->licensing.activationTokenEnv ==
|
||||
"ECHOION_LICENSE_TOKEN",
|
||||
"licensing identifiers receive safe defaults");
|
||||
expect(licensing->licensing.refreshInterval ==
|
||||
std::chrono::minutes(15) &&
|
||||
licensing->licensing.retryInterval ==
|
||||
std::chrono::seconds(30) &&
|
||||
licensing->licensing.maximumLeaseLifetime ==
|
||||
std::chrono::hours(24),
|
||||
"licensing cadence and offline lease are bounded");
|
||||
}
|
||||
|
||||
expectShortening("legacy disabled",
|
||||
R"({
|
||||
"youtube": {"enableUrlShortening": false},
|
||||
|
||||
Reference in new issue
Block a user