Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -30,7 +30,8 @@ namespace StellaOps.Policy.Gateway.Tests;
|
||||
|
||||
public sealed class GatewayActivationTests
|
||||
{
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task ActivateRevision_UsesServiceTokenFallback_And_RecordsMetrics()
|
||||
{
|
||||
await using var factory = new PolicyGatewayWebApplicationFactory();
|
||||
@@ -114,7 +115,8 @@ public sealed class GatewayActivationTests
|
||||
measurement.Source == "service");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task ActivateRevision_CompletesDualControlWorkflow()
|
||||
{
|
||||
await using var factory = new PolicyGatewayWebApplicationFactory();
|
||||
@@ -154,7 +156,8 @@ public sealed class GatewayActivationTests
|
||||
Assert.Equal(2, recordingHandler.RequestCount);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task ActivateRevision_RecordsMetrics_WhenUpstreamReturnsUnauthorized()
|
||||
{
|
||||
await using var factory = new PolicyGatewayWebApplicationFactory();
|
||||
@@ -240,7 +243,8 @@ public sealed class GatewayActivationTests
|
||||
measurement.Source == "service");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task ActivateRevision_RecordsMetrics_WhenUpstreamReturnsBadGateway()
|
||||
{
|
||||
await using var factory = new PolicyGatewayWebApplicationFactory();
|
||||
@@ -326,7 +330,8 @@ public sealed class GatewayActivationTests
|
||||
measurement.Source == "service");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task ActivateRevision_RetriesOnTooManyRequests()
|
||||
{
|
||||
await using var factory = new PolicyGatewayWebApplicationFactory();
|
||||
@@ -353,6 +358,7 @@ public sealed class GatewayActivationTests
|
||||
|
||||
using var client = factory.CreateClient();
|
||||
|
||||
using StellaOps.TestKit;
|
||||
try
|
||||
{
|
||||
var response = await client.PostAsJsonAsync(
|
||||
|
||||
Reference in New Issue
Block a user