Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -8,11 +8,13 @@ using Microsoft.Extensions.Options;
|
||||
using StellaOps.Scanner.Surface.Env;
|
||||
using StellaOps.Scanner.Surface.Validation;
|
||||
|
||||
using StellaOps.TestKit;
|
||||
namespace StellaOps.Scanner.Surface.Validation.Tests;
|
||||
|
||||
public sealed class SurfaceValidatorRunnerTests
|
||||
{
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task EnsureAsync_Throws_WhenValidationFails()
|
||||
{
|
||||
var services = CreateServices(services =>
|
||||
@@ -42,7 +44,8 @@ public sealed class SurfaceValidatorRunnerTests
|
||||
await Assert.ThrowsAsync<SurfaceValidationException>(() => runner.EnsureAsync(context));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task RunAllAsync_ReturnsSuccess_ForValidConfiguration()
|
||||
{
|
||||
var directory = new DirectoryInfo(Path.Combine(Path.GetTempPath(), "stellaops-tests", Guid.NewGuid().ToString()))
|
||||
@@ -71,7 +74,8 @@ public sealed class SurfaceValidatorRunnerTests
|
||||
Assert.True(result.IsSuccess);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task RunAllAsync_Fails_WhenInlineProviderDisallowed()
|
||||
{
|
||||
var directory = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), "stellaops-tests", Guid.NewGuid().ToString()));
|
||||
@@ -97,7 +101,8 @@ public sealed class SurfaceValidatorRunnerTests
|
||||
Assert.Contains(result.Issues, i => i.Code == SurfaceValidationIssueCodes.SecretsConfigurationInvalid);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task RunAllAsync_Fails_WhenFileRootMissing()
|
||||
{
|
||||
var missingRoot = Path.Combine(Path.GetTempPath(), "stellaops-tests", "missing-root", Guid.NewGuid().ToString());
|
||||
|
||||
Reference in New Issue
Block a user