Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -23,7 +23,8 @@ public sealed class SbomIngestServiceCollectionExtensionsTests : IDisposable
|
||||
Directory.CreateDirectory(_tempDirectory);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task AddSbomIngestPipeline_exports_snapshots_to_configured_directory()
|
||||
{
|
||||
var services = new ServiceCollection();
|
||||
@@ -42,7 +43,8 @@ public sealed class SbomIngestServiceCollectionExtensionsTests : IDisposable
|
||||
writer!.LastBatch.Should().NotBeNull();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task AddSbomIngestPipeline_uses_environment_variable_when_not_configured()
|
||||
{
|
||||
var previous = Environment.GetEnvironmentVariable("STELLAOPS_GRAPH_SNAPSHOT_DIR");
|
||||
@@ -56,6 +58,7 @@ public sealed class SbomIngestServiceCollectionExtensionsTests : IDisposable
|
||||
services.AddSbomIngestPipeline();
|
||||
|
||||
using var provider = services.BuildServiceProvider();
|
||||
using StellaOps.TestKit;
|
||||
var processor = provider.GetRequiredService<SbomIngestProcessor>();
|
||||
|
||||
var snapshot = LoadSnapshot();
|
||||
|
||||
Reference in New Issue
Block a user