up
This commit is contained in:
@@ -37,7 +37,7 @@ public class ProjectionEndpointTests : IClassFixture<WebApplicationFactory<Progr
|
||||
|
||||
builder.ConfigureServices(services =>
|
||||
{
|
||||
// Avoid MongoDB dependency in tests; use seeded in-memory repo.
|
||||
// Use seeded in-memory repo for tests.
|
||||
services.RemoveAll<IComponentLookupRepository>();
|
||||
services.AddSingleton<IComponentLookupRepository, InMemoryComponentLookupRepository>();
|
||||
});
|
||||
|
||||
@@ -32,7 +32,7 @@ internal sealed class InMemorySbomQueryService : ISbomQueryService
|
||||
_projectionRepository = projectionRepository;
|
||||
_eventPublisher = eventPublisher;
|
||||
_clock = clock;
|
||||
// Deterministic seed data for early contract testing; replace with Mongo-backed implementation later.
|
||||
// Deterministic seed data for early contract testing; replace with PostgreSQL-backed implementation later.
|
||||
_paths = SeedPaths();
|
||||
_timelines = SeedTimelines();
|
||||
}
|
||||
@@ -157,7 +157,7 @@ internal sealed class InMemorySbomQueryService : ISbomQueryService
|
||||
.Select(c => new ComponentNeighbor(c.NeighborPurl, c.Relationship, c.License, c.Scope, c.RuntimeFlag))
|
||||
.ToList();
|
||||
|
||||
var cacheHint = _componentLookupRepository.GetType().Name.Contains("Mongo", StringComparison.OrdinalIgnoreCase)
|
||||
var cacheHint = _componentLookupRepository.GetType().Name.Contains("Postgres", StringComparison.OrdinalIgnoreCase)
|
||||
? "storage"
|
||||
: "seeded";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user