Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -4,7 +4,8 @@ namespace StellaOps.Scanner.WebService.Tests;
|
||||
|
||||
public sealed class AuthorizationTests
|
||||
{
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task ApiRoutesRequireAuthenticationWhenAuthorityEnabled()
|
||||
{
|
||||
using var factory = new ScannerApplicationFactory().WithOverrides(configuration =>
|
||||
@@ -18,6 +19,7 @@ public sealed class AuthorizationTests
|
||||
});
|
||||
|
||||
using var client = factory.CreateClient();
|
||||
using StellaOps.TestKit;
|
||||
var response = await client.GetAsync("/api/v1/__auth-probe");
|
||||
|
||||
Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode);
|
||||
|
||||
Reference in New Issue
Block a user