public void Verify_probe_na() { var knowledgeBaseProvider = _provider.GetService <IKnowledgeBaseProvider>(); var probe = new SocketDescriptorThrottlingProbe(null, knowledgeBaseProvider); NodeSnapshot snapshot = new FakeNodeSnapshot1(10, 4, 4.2M); var result = probe.Execute(snapshot); result.Status.ShouldBe(ProbeResultStatus.NA); result.KB.Id.ShouldBe(typeof(SocketDescriptorThrottlingProbe).GetIdentifier()); }
public void Verify_probe_healthy_condition() { var knowledgeBaseProvider = _provider.GetService <IKnowledgeBaseProvider>(); var config = _provider.GetService <HareDuConfig>(); var probe = new SocketDescriptorThrottlingProbe(config.Diagnostics, knowledgeBaseProvider); NodeSnapshot snapshot = new FakeNodeSnapshot1(10, 4, 4.2M); var result = probe.Execute(snapshot); result.Status.ShouldBe(ProbeResultStatus.Healthy); result.KB.Id.ShouldBe(typeof(SocketDescriptorThrottlingProbe).GetIdentifier()); }