Allow endpoint warnings during setup acceptance
This commit is contained in:
@@ -52,6 +52,8 @@ namespace BizTalkCheckmkPulse.Tests
|
||||
Run("RuntimeValidationRejectsStaleCatalog", RuntimeValidationRejectsStaleCatalog);
|
||||
Run("RuntimeValidationRejectsChangedServiceContract", RuntimeValidationRejectsChangedServiceContract);
|
||||
Run("RuntimeValidationRejectsUnknownStableService", RuntimeValidationRejectsUnknownStableService);
|
||||
Run("RuntimeValidationAllowsEndpointUnknownAsWarning", RuntimeValidationAllowsEndpointUnknownAsWarning);
|
||||
Run("RuntimeValidationRejectsEndpointUnknownWhenProbeDisabled", RuntimeValidationRejectsEndpointUnknownWhenProbeDisabled);
|
||||
Run("RuntimeValidationAllowsDisabledEndpointProbeWithoutCatalog", RuntimeValidationAllowsDisabledEndpointProbeWithoutCatalog);
|
||||
Run("ForceEndpointRefreshRequiresProviderMode", ForceEndpointRefreshRequiresProviderMode);
|
||||
Run("RuntimeValidationArgumentsAreParsedStrictly", RuntimeValidationArgumentsAreParsedStrictly);
|
||||
@@ -1028,8 +1030,55 @@ namespace BizTalkCheckmkPulse.Tests
|
||||
"BEW\\t231bizmon",
|
||||
true,
|
||||
lines);
|
||||
Assert(!result.IsSuccess, "UNKNOWN stable service must fail runtime acceptance");
|
||||
Assert(result.Error.Contains("UNKNOWN=[BizTalk Platform]"), "UNKNOWN stable service reason missing");
|
||||
Assert(!result.IsSuccess, "UNKNOWN core service must fail runtime acceptance");
|
||||
Assert(result.Error.Contains("UNKNOWN=[BizTalk Platform]"), "UNKNOWN core service reason missing");
|
||||
}
|
||||
|
||||
private static void RuntimeValidationAllowsEndpointUnknownAsWarning()
|
||||
{
|
||||
var boundary = DateTime.UtcNow.AddMinutes(-1);
|
||||
var lines = new CheckmkLocalFormatter(new MonitoringOptions()).FormatSelfTest().ToArray();
|
||||
var endpointIndex = Array.FindIndex(
|
||||
lines,
|
||||
x => x.Contains("\"BizTalk Endpoint Reachability\""));
|
||||
Assert(endpointIndex >= 0, "endpoint service missing from self-test contract");
|
||||
lines[endpointIndex] = "3 \"BizTalk Endpoint Reachability\" "
|
||||
+ "biztalk_endpoints_unresolved=1;;1;0 Endpoint reachability incomplete; unresolved=1.";
|
||||
|
||||
var result = ValidateRuntimeArtifacts(
|
||||
boundary,
|
||||
boundary.AddSeconds(10),
|
||||
boundary.AddSeconds(5),
|
||||
"BEW\\t231bizmon",
|
||||
"BEW\\t231bizmon",
|
||||
true,
|
||||
lines);
|
||||
|
||||
Assert(result.IsSuccess, "endpoint UNKNOWN must be accepted as operational warning: " + result.Error);
|
||||
AssertEqual(1, result.AcceptedUnknownLines.Count, "accepted endpoint UNKNOWN count");
|
||||
Assert(result.AcceptedUnknownLines[0].Contains("unresolved=1"), "endpoint UNKNOWN detail must be retained");
|
||||
}
|
||||
|
||||
private static void RuntimeValidationRejectsEndpointUnknownWhenProbeDisabled()
|
||||
{
|
||||
var boundary = DateTime.UtcNow.AddMinutes(-1);
|
||||
var lines = new CheckmkLocalFormatter(new MonitoringOptions()).FormatSelfTest().ToArray();
|
||||
var endpointIndex = Array.FindIndex(
|
||||
lines,
|
||||
x => x.Contains("\"BizTalk Endpoint Reachability\""));
|
||||
lines[endpointIndex] = "3 \"BizTalk Endpoint Reachability\" - Unexpected UNKNOWN while probe is disabled.";
|
||||
|
||||
var result = ValidateRuntimeArtifacts(
|
||||
boundary,
|
||||
boundary.AddSeconds(10),
|
||||
null,
|
||||
"BEW\\t231bizmon",
|
||||
"BEW\\t231bizmon",
|
||||
false,
|
||||
lines);
|
||||
|
||||
Assert(!result.IsSuccess, "endpoint UNKNOWN must be rejected when endpoint probing is disabled");
|
||||
Assert(result.Error.Contains("UNKNOWN=[BizTalk Endpoint Reachability]"), "disabled-probe UNKNOWN reason missing");
|
||||
}
|
||||
|
||||
private static void ForceEndpointRefreshRequiresProviderMode()
|
||||
|
||||
Reference in New Issue
Block a user