= ({ message }) =>
7 | (
8 |
9 |
15 | error
16 |
17 | {message}
18 |
19 | );
20 |
21 | export { AlertPanel };
22 |
--------------------------------------------------------------------------------
/src/HealthChecks.UI/client/components/Footer.tsx:
--------------------------------------------------------------------------------
1 | import React, { FunctionComponent } from "react";
2 |
3 | const Footer: FunctionComponent = () => {
4 | return
7 | }
8 |
9 | export {Footer}
--------------------------------------------------------------------------------
/src/HealthChecks.UI/client/components/LivenessPanel.tsx:
--------------------------------------------------------------------------------
1 | import React, { FunctionComponent } from 'react';
2 |
3 | interface IDetailPanelProps {
4 | children: React.ReactNode;
5 | onClosePanel: any;
6 | visible: boolean
7 | }
8 |
9 | const LivenessPanel: FunctionComponent = ({
10 | children,
11 | visible,
12 | onClosePanel
13 | }) => (
14 |
21 | );
22 |
23 | export { LivenessPanel };
24 |
--------------------------------------------------------------------------------
/src/HealthChecks.UI/client/config/UISettings.ts:
--------------------------------------------------------------------------------
1 |
2 | export interface UISettings {
3 | uiApiEndpoint: string;
4 | uiSettingsEndpoint: string;
5 | webhookEndpoint: string
6 | asideMenuOpened: boolean
7 | }
8 |
9 | let settings : UISettings = {
10 | uiApiEndpoint: window.uiEndpoint,
11 | uiSettingsEndpoint: window.uiSettingsEndpoint,
12 | webhookEndpoint: window.webhookEndpoint,
13 | asideMenuOpened: JSON.parse(window.asideMenuOpened)
14 | };
15 |
16 | export default settings;
--------------------------------------------------------------------------------
/src/HealthChecks.UI/client/custom.d.ts:
--------------------------------------------------------------------------------
1 | declare module "*.svg" {
2 | const content: any;
3 | export default content;
4 | }
5 |
6 | declare module "*.png" {
7 | const value: any;
8 | export = value;
9 | }
10 |
11 | interface Window {
12 | uiEndpoint: string;
13 | uiSettingsEndpoint: string;
14 | webhookEndpoint: string
15 | asideMenuOpened: string
16 | }
17 |
--------------------------------------------------------------------------------
/src/HealthChecks.UI/client/index.tsx:
--------------------------------------------------------------------------------
1 | import "../assets/material.css";
2 | import * as React from "react";
3 | import * as ReactDOM from "react-dom";
4 | import { App } from './App';
5 | import { HashRouter } from "react-router-dom";
6 | import uiSettings from "./config/UISettings";
7 | let endpoint = `${window.location.origin}${window.uiEndpoint}`;
8 |
9 | ReactDOM.render(
10 |
11 |
12 | , document.getElementById("app"));
--------------------------------------------------------------------------------
/src/HealthChecks.UI/client/typings/global.d.ts:
--------------------------------------------------------------------------------
1 | type Nullable = T | null;
--------------------------------------------------------------------------------
/src/HealthChecks.UI/client/utils/array.ts:
--------------------------------------------------------------------------------
1 | const chunkArray = (array: Array, chunk_size: number): T[][] => {
2 | var index = 0;
3 | var arrayLength = array.length;
4 | var tempArray = [];
5 |
6 | for (index = 0; index < arrayLength; index += chunk_size) {
7 | let chunk = array.slice(index, index + chunk_size);
8 | tempArray.push(chunk);
9 | }
10 |
11 | return tempArray;
12 | }
13 |
14 | export { chunkArray };
--------------------------------------------------------------------------------
/src/HealthChecks.Uris/HealthChecks.Uris.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(DefaultLibraryTargetFrameworks)
5 | $(PackageTags);Uri;Url;Uris;Urls
6 | HealthChecks.Uris is a simple health check package for Uri groups.
7 | $(HealthCheckUri)
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/test/FunctionalTests/Base/CollectionExecutionFixture.cs:
--------------------------------------------------------------------------------
1 | using Xunit;
2 |
3 | namespace FunctionalTests.Base
4 | {
5 | [CollectionDefinition("execution")]
6 | public class CollectionExecutionFixture
7 | : ICollectionFixture
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/test/FunctionalTests/Base/ExecutionFixture.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace FunctionalTests.Base
4 | {
5 | public class ExecutionFixture
6 | {
7 | public bool IsAppVeyorExecution { get; private set; }
8 |
9 | public ExecutionFixture()
10 | {
11 | IsAppVeyorExecution = Environment.GetEnvironmentVariable("Appveyor")?.ToUpperInvariant() == "TRUE";
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/test/HealthChecks.ApplicationStatus.Tests/HealthChecks.ApplicationStatus.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.ArangoDb.Tests/HealthChecks.ArangoDb.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Aws.S3.Tests/HealthChecks.Aws.S3.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Aws.SecretsManager.Tests/HealthChecks.Aws.SecretsManager.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Aws.Sns.Tests/HealthChecks.Aws.Sns.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Aws.Sqs.Tests/HealthChecks.Aws.Sqs.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Aws.SystemsManager.Tests/HealthChecks.Aws.SystemsManager.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Azure.Data.Tables.Tests/HealthChecks.Azure.Data.Tables.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/HealthChecks.Azure.IoTHub.Tests/HealthChecks.Azure.IoTHub.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/HealthChecks.Azure.KeyVault.Secrets.Tests/HealthChecks.Azure.KeyVault.Secrets.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/HealthChecks.Azure.Messaging.EventHubs.Tests/HealthChecks.Azure.Messaging.EventHubs.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/HealthChecks.Azure.Storage.Blobs.Tests/HealthChecks.Azure.Storage.Blobs.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/HealthChecks.Azure.Storage.Files.Shares.Tests/HealthChecks.Azure.Storage.Files.Shares.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/HealthChecks.Azure.Storage.Queues.Tests/HealthChecks.Azure.Storage.Queues.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/HealthChecks.AzureApplicationInsights.Tests/HealthChecks.AzureApplicationInsights.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.AzureDigitalTwin.Tests/HealthChecks.AzureDigitalTwin.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/HealthChecks.AzureKeyVault.Tests/HealthChecks.AzureKeyVault.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/HealthChecks.AzureSearch.Tests/HealthChecks.AzureSearch.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.AzureServiceBus.Tests/HealthChecks.AzureServiceBus.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/HealthChecks.ClickHouse.Tests/HealthChecks.ClickHouse.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Consul.Tests/HealthChecks.Consul.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.CosmosDb.Tests/HealthChecks.CosmosDb.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Dapr.Tests/HealthChecks.Dapr.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.DynamoDb.Tests/HealthChecks.DynamoDb.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.EventStore.Tests/HealthChecks.EventStore.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.EventStore.gRPC.Tests/HealthChecks.EventStore.gRPC.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Gcp.CloudFirestore.Tests/HealthChecks.Gcp.CloudFirestore.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Gremlin.Tests/HealthChecks.Gremlin.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Hangfire.Tests/HealthChecks.Hangfire.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.IbmMQ.Tests/HealthChecks.IbmMQ.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.InfluxDB.Tests/HealthChecks.InfluxDB.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Kafka.Tests/HealthChecks.Kafka.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/test/HealthChecks.Kubernetes.Tests/HealthChecks.Kubernetes.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Milvus.Tests/HealthChecks.Milvus.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/test/HealthChecks.MongoDb.Tests/HealthChecks.MongoDb.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/test/HealthChecks.MySql.Tests/HealthChecks.MySql.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/test/HealthChecks.Nats.Tests/HealthChecks.Nats.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Network.Tests/Functional/HttpClientExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json;
2 |
3 | namespace System.Net.Http;
4 |
5 | public static class HttpClientExtensions
6 | {
7 | public static async Task GetAsJson(this HttpClient client, string url)
8 | {
9 | var response = await client.GetAsync(url).ConfigureAwait(false);
10 | string content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
11 | return JsonSerializer.Deserialize(content, new JsonSerializerOptions
12 | {
13 | PropertyNameCaseInsensitive = true,
14 | });
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/test/HealthChecks.Network.Tests/HealthChecks.Network.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | PreserveNewest
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/test/HealthChecks.Npgsql.Tests/HealthChecks.Npgsql.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/test/HealthChecks.OpenIdConnectServer.Tests/HealthChecks.OpenIdConnectServer.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Oracle.Tests/HealthChecks.Oracle.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Prometheus.Metrics.Tests/HealthChecks.Prometheus.Metrics.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Publisher.ApplicationInsights.Tests/HealthChecks.Publisher.ApplicationInsights.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Publisher.ApplicationInsights.Tests/HealthChecks.Publisher.ApplicationInsights.approved.txt:
--------------------------------------------------------------------------------
1 | namespace Microsoft.Extensions.DependencyInjection
2 | {
3 | public static class ApplicationInsightsHealthCheckBuilderExtensions
4 | {
5 | public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddApplicationInsightsPublisher(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string? connectionString = null, bool saveDetailedReport = false, bool excludeHealthyReports = false) { }
6 | }
7 | }
--------------------------------------------------------------------------------
/test/HealthChecks.Publisher.CloudWatch.Tests/HealthChecks.Publisher.CloudWatch.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Publisher.Datadog.Tests/HealthChecks.Publisher.Datadog.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Publisher.Prometheus.Tests/HealthChecks.Publisher.Prometheus.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Publisher.Seq.Tests/HealthChecks.Publisher.Seq.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Qdrant.Tests/HealthChecks.Qdrant.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/test/HealthChecks.RabbitMQ.Tests/HealthChecks.RabbitMQ.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/test/HealthChecks.RabbitMQ.v6.Tests/HealthChecks.RabbitMQ.v6.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | HealthChecks.RabbitMQ.Tests
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/test/HealthChecks.RavenDb.Tests/HealthChecks.RavenDb.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Redis.Tests/HealthChecks.Redis.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/test/HealthChecks.SendGrid.Tests/HealthChecks.SendGrid.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.SignalR.Tests/HealthChecks.SignalR.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.Solr.Tests/HealthChecks.Solr.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.SqlServer.Tests/HealthChecks.SqlServer.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/test/HealthChecks.Sqlite.Tests/HealthChecks.Sqlite.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.SurrealDb.Tests/HealthChecks.SurrealDb.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.System.Tests/HealthChecks.System.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.UI.Client.Tests/HealthChecks.UI.Client.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/test/HealthChecks.UI.Client.Tests/HealthChecks.UI.Client.approved.txt:
--------------------------------------------------------------------------------
1 | namespace HealthChecks.UI.Client
2 | {
3 | public static class UIResponseWriter
4 | {
5 | public static System.Threading.Tasks.Task WriteHealthCheckUIResponse(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.Extensions.Diagnostics.HealthChecks.HealthReport report) { }
6 | public static System.Threading.Tasks.Task WriteHealthCheckUIResponseNoExceptionDetails(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.Extensions.Diagnostics.HealthChecks.HealthReport report) { }
7 | }
8 | }
--------------------------------------------------------------------------------
/test/HealthChecks.UI.Core.Tests/HealthChecks.UI.Core.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/HealthChecks.UI.Data.Tests/HealthChecks.UI.Data.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/HealthChecks.UI.Tests/Functional/DefaultStartup.cs:
--------------------------------------------------------------------------------
1 | namespace HealthChecks.UI.Tests;
2 |
3 | public class DefaultStartup
4 | {
5 | public void ConfigureServices(IServiceCollection services)
6 | {
7 | }
8 |
9 | public void Configure(IApplicationBuilder app)
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/test/HealthChecks.UI.Tests/Seedwork/StringAssertionExtensions.cs:
--------------------------------------------------------------------------------
1 | namespace HealthChecks.UI.Tests;
2 |
3 | public static class StringAssertionExentions
4 | {
5 | public static string ShouldContainCheckAndResult(this string value, string checkName, HealthStatus expectedResult)
6 | {
7 | value.ShouldContain($"healthcheck{{healthcheck=\"{checkName}\"}} {expectedResult:D}",
8 | customMessage: "health check must be included");
9 | value.ShouldContain($"healthcheck_duration_seconds{{healthcheck=\"{checkName}\"}}",
10 | customMessage: "health check duration must be included");
11 | return value;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/test/HealthChecks.UI.Tests/xunit.runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
3 | "diagnosticMessages": true,
4 | "longRunningTestSeconds": 10,
5 | "parallelizeAssembly": false,
6 | "parallelizeTestCollections": false
7 | }
--------------------------------------------------------------------------------
/test/HealthChecks.Uris.Tests/HealthChecks.Uris.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/_SHARED/TestLogger.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.Logging;
2 |
3 | public sealed class TestLogger : ILogger
4 | {
5 | public List<(DateTime, string)> EventLog { get; } = new();
6 | public IDisposable? BeginScope(TState state) where TState : notnull => default!;
7 | public bool IsEnabled(LogLevel logLevel) => true;
8 | public void Log(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func formatter)
9 | => EventLog.Add(new(DateTime.Now, formatter(state, exception)));
10 | }
11 |
--------------------------------------------------------------------------------
/test/_SHARED/TestLoggerProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Concurrent;
2 | using Microsoft.Extensions.Logging;
3 |
4 | public sealed class TestLoggerProvider : ILoggerProvider
5 | {
6 | private readonly ConcurrentDictionary _loggers = new(StringComparer.OrdinalIgnoreCase);
7 | public ILogger CreateLogger(string categoryName) => _loggers.GetOrAdd(categoryName, _ => new TestLogger());
8 | public void Dispose() => _loggers.Clear();
9 | public TestLogger? GetLogger(string categoryName) => _loggers.GetValueOrDefault(categoryName);
10 | }
11 |
--------------------------------------------------------------------------------