This commit is contained in:
StellaOps Bot
2025-12-26 21:43:56 +02:00
354 changed files with 354 additions and 0 deletions

View File

@@ -110,6 +110,7 @@ public sealed class SlackChannelTestProviderTests
private static string ComputeSecretHash(string secretRef)
{
using var sha = System.Security.Cryptography.SHA256.Create();
using StellaOps.TestKit;
var bytes = System.Text.Encoding.UTF8.GetBytes(secretRef.Trim());
var hash = sha.ComputeHash(bytes);
return System.Convert.ToHexString(hash, 0, 8).ToLowerInvariant();

View File

@@ -66,6 +66,7 @@ public sealed class TeamsChannelTestProviderTests
Assert.Equal(channel.Config.Endpoint, result.Metadata["teams.config.endpoint"]);
using var payload = JsonDocument.Parse(result.Preview.Body);
using StellaOps.TestKit;
Assert.Equal("message", payload.RootElement.GetProperty("type").GetString());
Assert.Equal(result.Preview.TextBody, payload.RootElement.GetProperty("text").GetString());
Assert.Equal(result.Preview.Summary, payload.RootElement.GetProperty("summary").GetString());

View File

@@ -144,6 +144,7 @@ public sealed class NatsNotifyDeliveryQueueTests : IAsyncLifetime
await Task.Delay(200);
await using var connection = new NatsConnection(new NatsOpts { Url = options.Nats.Url! });
using StellaOps.TestKit;
await connection.ConnectAsync();
var js = new NatsJSContext(connection);

View File

@@ -156,6 +156,7 @@ public sealed class NatsNotifyEventQueueTests : IAsyncLifetime
var options = CreateOptions();
await using var queue = CreateQueue(options);
using StellaOps.TestKit;
var notifyEvent = TestData.CreateEvent();
await queue.PublishAsync(new NotifyQueueEventMessage(notifyEvent, options.Nats.Subject));

View File

@@ -124,6 +124,7 @@ public sealed class RedisNotifyDeliveryQueueTests : IAsyncLifetime
await using var queue = CreateQueue(options);
using StellaOps.TestKit;
await queue.PublishAsync(new NotifyDeliveryQueueMessage(
TestData.CreateDelivery(),
channelId: "channel-dead",

View File

@@ -152,6 +152,7 @@ public sealed class RedisNotifyEventQueueTests : IAsyncLifetime
var options = CreateOptions();
await using var queue = CreateQueue(options);
using StellaOps.TestKit;
var notifyEvent = TestData.CreateEvent();
await queue.PublishAsync(new NotifyQueueEventMessage(notifyEvent, options.Redis.Streams[0].Stream));

View File

@@ -298,6 +298,7 @@ public sealed class CrudEndpointsTests : IClassFixture<WebApplicationFactory<Pro
builder.ConfigureServices(services =>
{
services.AddSingleton<INotifyChannelTestProvider, FakeSlackTestProvider>();
using StellaOps.TestKit;
});
});