Merge branch 'main' of https://git.stella-ops.org/stella-ops.org/git.stella-ops.org
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -298,6 +298,7 @@ public sealed class CrudEndpointsTests : IClassFixture<WebApplicationFactory<Pro
|
||||
builder.ConfigureServices(services =>
|
||||
{
|
||||
services.AddSingleton<INotifyChannelTestProvider, FakeSlackTestProvider>();
|
||||
using StellaOps.TestKit;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user