Files
Heimdall/tests/Heimdall.Workers.Tests/PlaceholderTest.cs
T
Arnaud Dartois ba968a5f23 fix(security): harden Docker, CSRF, EventsHub scoping, secret logging, tests
- Docker: remove default passwords from prod compose (required env vars)
- CSRF: validate antiforgery tokens on /_auth/signin and /_auth/signout
- EventsHub: broadcast to site-scoped Group() instead of Clients.All
- SettingsController: redact secret values in logs
- Create SetAgentSettingValidator + UpdateAppSettingValidator classes
- Replace 3 placeholder test projects with meaningful tests
- Remove FluentValidation auto-validation (incompatible with .NET 10)
2026-07-19 20:53:48 +00:00

39 lines
974 B
C#

using Hangfire;
using Hangfire.MemoryStorage;
using Microsoft.Extensions.DependencyInjection;
namespace Heimdall.Workers.Tests;
public class HangfireConfigurationTests
{
[Fact]
public void AddHangfire_WithMemoryStorage_RegistersJobStorage()
{
var services = new ServiceCollection();
services.AddHangfire(config =>
{
config.UseMemoryStorage();
});
var provider = services.BuildServiceProvider();
var storage = provider.GetService<JobStorage>();
Assert.NotNull(storage);
}
[Fact]
public void AddHangfire_WithMemoryStorage_StorageIsMemoryStorage()
{
var services = new ServiceCollection();
services.AddHangfire(config =>
{
config.UseMemoryStorage();
});
var provider = services.BuildServiceProvider();
var storage = provider.GetRequiredService<JobStorage>();
Assert.IsType<MemoryStorage>(storage);
}
}