Agent-Logs-Url: https://github.com/elsa-workflows/elsa-core/sessions/71c9cf76-ccac-4020-87f4-1e4122d34645 Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
24 lines
705 B
C#
24 lines
705 B
C#
using Elsa.Extensions;
|
|
using Elsa.Workflows.Runtime.Options;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Options;
|
|
|
|
namespace Elsa.Workflows.Runtime.UnitTests.HealthChecks;
|
|
|
|
public class HealthCheckExtensionsTests
|
|
{
|
|
[Fact]
|
|
public void AddElsaReadinessChecksRegistersReadinessOptions()
|
|
{
|
|
var services = new ServiceCollection();
|
|
|
|
services
|
|
.AddHealthChecks()
|
|
.AddElsaReadinessChecks(includePersistence: false, includeDistributedLocks: true);
|
|
|
|
using var serviceProvider = services.BuildServiceProvider();
|
|
|
|
Assert.NotNull(serviceProvider.GetRequiredService<IOptions<ElsaReadinessHealthCheckOptions>>());
|
|
}
|
|
}
|