public void ReturnsExpectedPath(string checkName, string[] names)
            {
                var title = $"Pingdom check '{checkName}' is failing! 'https://test' is DOWN!";

                IncidentParsingHandlerTestUtility.AssertTryParseAffectedComponentPath(
                    Handler, new Incident {
                    Title = title
                }, true, ComponentUtility.GetPath(names));
            }
            public void ReturnsFalseIfUnexpectedCheck()
            {
                var title = $"Pingdom check 'invalid' is failing! 'https://test' is DOWN!";

                IncidentParsingHandlerTestUtility.AssertTryParseAffectedComponentPath(
                    Handler, new Incident {
                    Title = title
                }, false, null);
            }
Ejemplo n.º 3
0
            public void ReturnsExpected(string environment, string domain, string target, string[] names)
            {
                var title = $"[{environment}] Traffic Manager for {domain} is reporting {target} as not Online!";

                IncidentParsingHandlerTestUtility.AssertTryParseAffectedComponentPath(
                    Handler, new Incident {
                    Title = title
                }, true, ComponentUtility.GetPath(names));
            }
            public void ReturnsExpectedResponse(string title, bool success, string affectedComponentPath)
            {
                var incident = new Incident {
                    Title = title
                };

                IncidentParsingHandlerTestUtility.AssertTryParseAffectedComponentPath(
                    Handler, incident, success, affectedComponentPath);
            }
Ejemplo n.º 5
0
            public void ReturnsFalseIfUnexpectedValues()
            {
                var title = "[environment] Traffic Manager for domain is reporting target as not Online!";

                IncidentParsingHandlerTestUtility.AssertTryParseAffectedComponentPath(
                    Handler, new Incident {
                    Title = title
                }, false, null);
            }
            public void IgnoresSeverityFilter()
            {
                var severityFilter    = IncidentParsingHandlerTestUtility.CreateSeverityFilter(0);
                var environmentFilter = IncidentParsingHandlerTestUtility.CreateEnvironmentFilter();

                var handler = Construct(new IIncidentRegexParsingFilter[] { severityFilter, environmentFilter });

                Assert.Single(handler.Filters);
                Assert.Contains(environmentFilter, handler.Filters);
                Assert.DoesNotContain(severityFilter, handler.Filters);
            }
Ejemplo n.º 7
0
        public void ReturnsTrueWhenSeverityLessThanOrEqualTo(int maximumSeverity, int inputSeverity)
        {
            var incident = new Incident
            {
                Severity = inputSeverity
            };

            var filter = IncidentParsingHandlerTestUtility.CreateSeverityFilter(maximumSeverity);

            var result = filter.ShouldParse(incident, null);

            Assert.Equal(inputSeverity <= maximumSeverity, result);
        }
Ejemplo n.º 8
0
 public EnvironmentRegexParsingFilterTest()
 {
     Filter = IncidentParsingHandlerTestUtility.CreateEnvironmentFilter(Environment1, Environment2);
 }
            public OutdatedSearchServiceInstanceIncidentRegexParsingHandlerTest()
            {
                var environmentFilter = IncidentParsingHandlerTestUtility.CreateEnvironmentFilter();

                Handler = Construct(new[] { environmentFilter });
            }
 public AIAvailabilityIncidentRegexParsingHandlerTest()
 {
     Handler = Construct(
         new[] { IncidentParsingHandlerTestUtility.CreateEnvironmentFilter(Environment) });
 }
Ejemplo n.º 11
0
 public TrafficManagerEndpointStatusIncidentRegexParsingHandlerTest()
 {
     Handler = new TrafficManagerEndpointStatusIncidentRegexParsingHandler(
         new[] { IncidentParsingHandlerTestUtility.CreateEnvironmentFilter(Dev, Int, Prod) },
         Mock.Of <ILogger <TrafficManagerEndpointStatusIncidentRegexParsingHandler> >());
 }
            public void DoesNotThrowWithEnvironmentFilter()
            {
                var handler = Construct(new[] { IncidentParsingHandlerTestUtility.CreateEnvironmentFilter() });

                Assert.NotNull(handler);
            }
            public ValidationDurationIncidentRegexParsingHandlerTest()
            {
                var environmentFilter = IncidentParsingHandlerTestUtility.CreateEnvironmentFilter();

                Handler = Construct(new[] { environmentFilter });
            }