This commit is contained in:
		| @@ -117,6 +117,7 @@ You have to read `./ARCHITECTURE.md` for more information. | |||||||
| - **Determinism**: Sort keys, normalize timestamps to UTC ISO‑8601, avoid non‑deterministic data in exports and tests. | - **Determinism**: Sort keys, normalize timestamps to UTC ISO‑8601, avoid non‑deterministic data in exports and tests. | ||||||
| - **Status tracking**: Update your module’s `TASKS.md` as you progress (TODO → DOING → DONE/BLOCKED). | - **Status tracking**: Update your module’s `TASKS.md` as you progress (TODO → DOING → DONE/BLOCKED). | ||||||
| - **Tests**: Add/extend fixtures and unit tests per change; never regress determinism or precedence. | - **Tests**: Add/extend fixtures and unit tests per change; never regress determinism or precedence. | ||||||
|  | - **Test layout**: Use module-specific projects in `StellaOps.Feedser.<Component>.Tests`; shared fixtures/harnesses live in `StellaOps.Feedser.Testing`. | ||||||
|  |  | ||||||
| --- | --- | ||||||
|  |  | ||||||
|   | |||||||
| @@ -62,7 +62,7 @@ StellaOps.Feedser.Normalization/     # Canonical mappers, validators, version-ra | |||||||
| StellaOps.Feedser.Merge/             # Identity graph, precedence, deterministic merge | StellaOps.Feedser.Merge/             # Identity graph, precedence, deterministic merge | ||||||
| StellaOps.Feedser.Exporter.Json/ | StellaOps.Feedser.Exporter.Json/ | ||||||
| StellaOps.Feedser.Exporter.TrivyDb/ | StellaOps.Feedser.Exporter.TrivyDb/ | ||||||
| StellaOps.Feedser.Tests/             # Unit, component, integration & golden fixtures | StellaOps.Feedser.<Component>.Tests/  # Component-scoped unit/integration suites (Core, Storage.Mongo, Source.*, Exporter.*, WebService, etc.) | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| --- | --- | ||||||
|   | |||||||
| @@ -11,4 +11,19 @@ | |||||||
|       <ExcludeAssets>runtime</ExcludeAssets> |       <ExcludeAssets>runtime</ExcludeAssets> | ||||||
|     </ProjectReference> |     </ProjectReference> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|  |  | ||||||
|  |   <ItemGroup Condition="$([System.String]::Copy('$(MSBuildProjectName)').EndsWith('.Tests'))"> | ||||||
|  |     <PackageReference Include="coverlet.collector" Version="6.0.4" /> | ||||||
|  |     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" /> | ||||||
|  |     <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" /> | ||||||
|  |     <PackageReference Include="Mongo2Go" Version="3.1.3" /> | ||||||
|  |     <PackageReference Include="xunit" Version="2.9.2" /> | ||||||
|  |     <PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" /> | ||||||
|  |     <PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="8.4.0" /> | ||||||
|  |     <Compile Include="$(MSBuildThisFileDirectory)StellaOps.Feedser.Tests.Shared\AssemblyInfo.cs" Link="Shared\AssemblyInfo.cs" /> | ||||||
|  |     <Compile Include="$(MSBuildThisFileDirectory)StellaOps.Feedser.Tests.Shared\MongoFixtureCollection.cs" Link="Shared\MongoFixtureCollection.cs" /> | ||||||
|  |     <ProjectReference Include="$(MSBuildThisFileDirectory)StellaOps.Feedser.Testing\StellaOps.Feedser.Testing.csproj" /> | ||||||
|  |     <Using Include="StellaOps.Feedser.Testing" /> | ||||||
|  |     <Using Include="Xunit" /> | ||||||
|  |   </ItemGroup> | ||||||
| </Project> | </Project> | ||||||
| @@ -6,7 +6,7 @@ using Microsoft.Extensions.Logging.Abstractions; | |||||||
| using Microsoft.Extensions.Options; | using Microsoft.Extensions.Options; | ||||||
| using StellaOps.Feedser.Core.Jobs; | using StellaOps.Feedser.Core.Jobs; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Core; | namespace StellaOps.Feedser.Core.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class JobCoordinatorTests | public sealed class JobCoordinatorTests | ||||||
| { | { | ||||||
| @@ -0,0 +1,10 @@ | |||||||
|  | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |   <PropertyGroup> | ||||||
|  |     <TargetFramework>net10.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|  |     <Nullable>enable</Nullable> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Core/StellaOps.Feedser.Core.csproj" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | </Project> | ||||||
| @@ -25,3 +25,8 @@ Out: business logic of connectors/exporters, HTTP handlers (owned by WebService) | |||||||
| - Metrics: job.run.started/succeeded/failed, job.durationMs, job.concurrent.rejected, job.alreadyRunning. | - Metrics: job.run.started/succeeded/failed, job.durationMs, job.concurrent.rejected, job.alreadyRunning. | ||||||
| - Logs: kind, trigger, params hash, lease holder, outcome; redact params containing secrets. | - Logs: kind, trigger, params hash, lease holder, outcome; redact params containing secrets. | ||||||
| - Honor CancellationToken early and often. | - Honor CancellationToken early and often. | ||||||
|  | ## Tests | ||||||
|  | - Author and review coverage in `../StellaOps.Feedser.Core.Tests`. | ||||||
|  | - Shared fixtures (e.g., `MongoIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Feedser.Testing`. | ||||||
|  | - Keep fixtures deterministic; match new cases to real-world advisories or regression scenarios. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ using System.Threading.Tasks; | |||||||
| using StellaOps.Feedser.Exporter.Json; | using StellaOps.Feedser.Exporter.Json; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Exporter.Json; | namespace StellaOps.Feedser.Exporter.Json.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class JsonExportSnapshotBuilderTests : IDisposable | public sealed class JsonExportSnapshotBuilderTests : IDisposable | ||||||
| { | { | ||||||
| @@ -11,7 +11,7 @@ using StellaOps.Feedser.Storage.Mongo.Advisories; | |||||||
| using StellaOps.Feedser.Storage.Mongo.Exporting; | using StellaOps.Feedser.Storage.Mongo.Exporting; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Exporter.Json; | namespace StellaOps.Feedser.Exporter.Json.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class JsonExporterDependencyInjectionRoutineTests | public sealed class JsonExporterDependencyInjectionRoutineTests | ||||||
| { | { | ||||||
| @@ -8,7 +8,7 @@ using System.Threading.Tasks; | |||||||
| using StellaOps.Feedser.Exporter.Json; | using StellaOps.Feedser.Exporter.Json; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Exporter.Json; | namespace StellaOps.Feedser.Exporter.Json.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class JsonExporterParitySmokeTests : IDisposable | public sealed class JsonExporterParitySmokeTests : IDisposable | ||||||
| { | { | ||||||
| @@ -15,7 +15,7 @@ using StellaOps.Feedser.Models; | |||||||
| using StellaOps.Feedser.Storage.Mongo.Advisories; | using StellaOps.Feedser.Storage.Mongo.Advisories; | ||||||
| using StellaOps.Feedser.Storage.Mongo.Exporting; | using StellaOps.Feedser.Storage.Mongo.Exporting; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Exporter.Json; | namespace StellaOps.Feedser.Exporter.Json.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class JsonFeedExporterTests : IDisposable | public sealed class JsonFeedExporterTests : IDisposable | ||||||
| { | { | ||||||
| @@ -0,0 +1,13 @@ | |||||||
|  | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |   <PropertyGroup> | ||||||
|  |     <TargetFramework>net10.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|  |     <Nullable>enable</Nullable> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Core/StellaOps.Feedser.Core.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Exporter.Json/StellaOps.Feedser.Exporter.Json.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Models/StellaOps.Feedser.Models.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Storage.Mongo/StellaOps.Feedser.Storage.Mongo.csproj" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | </Project> | ||||||
| @@ -4,7 +4,7 @@ using System.IO; | |||||||
| using StellaOps.Feedser.Exporter.Json; | using StellaOps.Feedser.Exporter.Json; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Exporter.Json; | namespace StellaOps.Feedser.Exporter.Json.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class VulnListJsonExportPathResolverTests | public sealed class VulnListJsonExportPathResolverTests | ||||||
| { | { | ||||||
| @@ -21,3 +21,8 @@ Out: ORAS push and Trivy DB BoltDB writing (owned by Trivy exporter). | |||||||
| ## Observability & security expectations | ## Observability & security expectations | ||||||
| - Metrics: export.json.records, bytes, duration, delta.changed. | - Metrics: export.json.records, bytes, duration, delta.changed. | ||||||
| - Logs: target path, record counts, digest; no sensitive data. | - Logs: target path, record counts, digest; no sensitive data. | ||||||
|  | ## Tests | ||||||
|  | - Author and review coverage in `../StellaOps.Feedser.Exporter.Json.Tests`. | ||||||
|  | - Shared fixtures (e.g., `MongoIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Feedser.Testing`. | ||||||
|  | - Keep fixtures deterministic; match new cases to real-world advisories or regression scenarios. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -0,0 +1,13 @@ | |||||||
|  | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |   <PropertyGroup> | ||||||
|  |     <TargetFramework>net10.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|  |     <Nullable>enable</Nullable> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Exporter.Json/StellaOps.Feedser.Exporter.Json.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Exporter.TrivyDb/StellaOps.Feedser.Exporter.TrivyDb.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Models/StellaOps.Feedser.Models.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Storage.Mongo/StellaOps.Feedser.Storage.Mongo.csproj" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | </Project> | ||||||
| @@ -2,7 +2,7 @@ using System; | |||||||
| using StellaOps.Feedser.Exporter.TrivyDb; | using StellaOps.Feedser.Exporter.TrivyDb; | ||||||
| using StellaOps.Feedser.Storage.Mongo.Exporting; | using StellaOps.Feedser.Storage.Mongo.Exporting; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Exporter.TrivyDb; | namespace StellaOps.Feedser.Exporter.TrivyDb.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class TrivyDbExportPlannerTests | public sealed class TrivyDbExportPlannerTests | ||||||
| { | { | ||||||
| @@ -14,7 +14,7 @@ using StellaOps.Feedser.Models; | |||||||
| using StellaOps.Feedser.Storage.Mongo.Advisories; | using StellaOps.Feedser.Storage.Mongo.Advisories; | ||||||
| using StellaOps.Feedser.Storage.Mongo.Exporting; | using StellaOps.Feedser.Storage.Mongo.Exporting; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Exporter.TrivyDb; | namespace StellaOps.Feedser.Exporter.TrivyDb.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class TrivyDbFeedExporterTests : IDisposable | public sealed class TrivyDbFeedExporterTests : IDisposable | ||||||
| { | { | ||||||
| @@ -7,7 +7,7 @@ using System.Text.Json; | |||||||
| using System.Security.Cryptography; | using System.Security.Cryptography; | ||||||
| using StellaOps.Feedser.Exporter.TrivyDb; | using StellaOps.Feedser.Exporter.TrivyDb; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Exporter.TrivyDb; | namespace StellaOps.Feedser.Exporter.TrivyDb.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class TrivyDbOciWriterTests : IDisposable | public sealed class TrivyDbOciWriterTests : IDisposable | ||||||
| { | { | ||||||
| @@ -6,7 +6,7 @@ using System.Text; | |||||||
| using System.Text.Json; | using System.Text.Json; | ||||||
| using StellaOps.Feedser.Exporter.TrivyDb; | using StellaOps.Feedser.Exporter.TrivyDb; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Exporter.TrivyDb; | namespace StellaOps.Feedser.Exporter.TrivyDb.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class TrivyDbPackageBuilderTests | public sealed class TrivyDbPackageBuilderTests | ||||||
| { | { | ||||||
| @@ -22,3 +22,8 @@ Out: signing (external pipeline), scanner behavior. | |||||||
| ## Observability & security expectations | ## Observability & security expectations | ||||||
| - Metrics: export.trivy.records, size_bytes, duration, oras.push.success/fail. | - Metrics: export.trivy.records, size_bytes, duration, oras.push.success/fail. | ||||||
| - Logs: export path, repo/tag, digest; redact credentials; backoff on push errors. | - Logs: export path, repo/tag, digest; redact credentials; backoff on push errors. | ||||||
|  | ## Tests | ||||||
|  | - Author and review coverage in `../StellaOps.Feedser.Exporter.TrivyDb.Tests`. | ||||||
|  | - Shared fixtures (e.g., `MongoIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Feedser.Testing`. | ||||||
|  | - Keep fixtures deterministic; match new cases to real-world advisories or regression scenarios. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -4,7 +4,7 @@ using Microsoft.Extensions.Time.Testing; | |||||||
| using StellaOps.Feedser.Merge.Services; | using StellaOps.Feedser.Merge.Services; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Merge; | namespace StellaOps.Feedser.Merge.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class AdvisoryPrecedenceMergerTests | public sealed class AdvisoryPrecedenceMergerTests | ||||||
| { | { | ||||||
| @@ -2,7 +2,7 @@ using System; | |||||||
| using StellaOps.Feedser.Merge.Services; | using StellaOps.Feedser.Merge.Services; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Merge; | namespace StellaOps.Feedser.Merge.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class AffectedPackagePrecedenceResolverTests | public sealed class AffectedPackagePrecedenceResolverTests | ||||||
| { | { | ||||||
| @@ -2,7 +2,7 @@ using System.Linq; | |||||||
| using StellaOps.Feedser.Merge.Services; | using StellaOps.Feedser.Merge.Services; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Merge; | namespace StellaOps.Feedser.Merge.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class CanonicalHashCalculatorTests | public sealed class CanonicalHashCalculatorTests | ||||||
| { | { | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| using StellaOps.Feedser.Merge.Comparers; | using StellaOps.Feedser.Merge.Comparers; | ||||||
| using StellaOps.Feedser.Normalization.Distro; | using StellaOps.Feedser.Normalization.Distro; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Merge; | namespace StellaOps.Feedser.Merge.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class DebianEvrComparerTests | public sealed class DebianEvrComparerTests | ||||||
| { | { | ||||||
| @@ -4,7 +4,7 @@ using StellaOps.Feedser.Merge.Services; | |||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| using StellaOps.Feedser.Storage.Mongo.MergeEvents; | using StellaOps.Feedser.Storage.Mongo.MergeEvents; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Merge; | namespace StellaOps.Feedser.Merge.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class MergeEventWriterTests | public sealed class MergeEventWriterTests | ||||||
| { | { | ||||||
| @@ -9,9 +9,9 @@ using StellaOps.Feedser.Merge.Services; | |||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| using StellaOps.Feedser.Storage.Mongo; | using StellaOps.Feedser.Storage.Mongo; | ||||||
| using StellaOps.Feedser.Storage.Mongo.MergeEvents; | using StellaOps.Feedser.Storage.Mongo.MergeEvents; | ||||||
| using StellaOps.Feedser.Tests.Storage; | using StellaOps.Feedser.Testing; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Merge; | namespace StellaOps.Feedser.Merge.Tests; | ||||||
| 
 | 
 | ||||||
| [Collection("mongo-fixture")] | [Collection("mongo-fixture")] | ||||||
| public sealed class MergePrecedenceIntegrationTests : IAsyncLifetime | public sealed class MergePrecedenceIntegrationTests : IAsyncLifetime | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| using StellaOps.Feedser.Merge.Comparers; | using StellaOps.Feedser.Merge.Comparers; | ||||||
| using StellaOps.Feedser.Normalization.Distro; | using StellaOps.Feedser.Normalization.Distro; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Merge; | namespace StellaOps.Feedser.Merge.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class NevraComparerTests | public sealed class NevraComparerTests | ||||||
| { | { | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using StellaOps.Feedser.Merge.Comparers; | using StellaOps.Feedser.Merge.Comparers; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Merge; | namespace StellaOps.Feedser.Merge.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class SemanticVersionRangeResolverTests | public sealed class SemanticVersionRangeResolverTests | ||||||
| { | { | ||||||
| @@ -0,0 +1,13 @@ | |||||||
|  | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |   <PropertyGroup> | ||||||
|  |     <TargetFramework>net10.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|  |     <Nullable>enable</Nullable> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Merge/StellaOps.Feedser.Merge.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Models/StellaOps.Feedser.Models.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Normalization/StellaOps.Feedser.Normalization.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Storage.Mongo/StellaOps.Feedser.Storage.Mongo.csproj" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | </Project> | ||||||
| @@ -23,3 +23,8 @@ Out: fetching/parsing, exporter packaging, signing. | |||||||
| ## Observability & security expectations | ## Observability & security expectations | ||||||
| - Metrics: merge.delta.count, merge.identity.conflicts, merge.range.overrides, merge.duration_ms. | - Metrics: merge.delta.count, merge.identity.conflicts, merge.range.overrides, merge.duration_ms. | ||||||
| - Logs: decisions (why replaced), keys involved, hashes; avoid dumping large blobs; redact secrets (none expected). | - Logs: decisions (why replaced), keys involved, hashes; avoid dumping large blobs; redact secrets (none expected). | ||||||
|  | ## Tests | ||||||
|  | - Author and review coverage in `../StellaOps.Feedser.Merge.Tests`. | ||||||
|  | - Shared fixtures (e.g., `MongoIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Feedser.Testing`. | ||||||
|  | - Keep fixtures deterministic; match new cases to real-world advisories or regression scenarios. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| using System.Linq; | using System.Linq; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Models; | namespace StellaOps.Feedser.Models.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class AdvisoryTests | public sealed class AdvisoryTests | ||||||
| { | { | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| using System; | using System; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Models; | namespace StellaOps.Feedser.Models.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class AffectedPackageStatusTests | public sealed class AffectedPackageStatusTests | ||||||
| { | { | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Models; | namespace StellaOps.Feedser.Models.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class AliasSchemeRegistryTests | public sealed class AliasSchemeRegistryTests | ||||||
| { | { | ||||||
| @@ -2,7 +2,7 @@ using System.Collections.Generic; | |||||||
| using System.Globalization; | using System.Globalization; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Models; | namespace StellaOps.Feedser.Models.Tests; | ||||||
| 
 | 
 | ||||||
| internal static class CanonicalExampleFactory | internal static class CanonicalExampleFactory | ||||||
| { | { | ||||||
| @@ -1,11 +1,11 @@ | |||||||
| using System.Text; | using System.Text; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Models; | namespace StellaOps.Feedser.Models.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class CanonicalExamplesTests | public sealed class CanonicalExamplesTests | ||||||
| { | { | ||||||
|     private static readonly string FixtureRoot = Path.Combine(GetProjectRoot(), "Models", "Fixtures"); |     private static readonly string FixtureRoot = Path.Combine(GetProjectRoot(), "Fixtures"); | ||||||
|     private const string UpdateEnvVar = "UPDATE_GOLDENS"; |     private const string UpdateEnvVar = "UPDATE_GOLDENS"; | ||||||
| 
 | 
 | ||||||
|     [Trait("Category", "GoldenSnapshots")] |     [Trait("Category", "GoldenSnapshots")] | ||||||
| @@ -3,7 +3,7 @@ using System.Linq; | |||||||
| using System.Text.Json; | using System.Text.Json; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Models; | namespace StellaOps.Feedser.Models.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class CanonicalJsonSerializerTests | public sealed class CanonicalJsonSerializerTests | ||||||
| { | { | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Models; | namespace StellaOps.Feedser.Models.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class SeverityNormalizationTests | public sealed class SeverityNormalizationTests | ||||||
| { | { | ||||||
| @@ -0,0 +1,10 @@ | |||||||
|  | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |   <PropertyGroup> | ||||||
|  |     <TargetFramework>net10.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|  |     <Nullable>enable</Nullable> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Models/StellaOps.Feedser.Models.csproj" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | </Project> | ||||||
| @@ -23,3 +23,8 @@ Out: fetching/parsing external schemas, storage, HTTP. | |||||||
| - No secrets; purely in-memory types. | - No secrets; purely in-memory types. | ||||||
| - Provide debug renders for test snapshots (canonical JSON). | - Provide debug renders for test snapshots (canonical JSON). | ||||||
| - Emit model version identifiers in logs when canonical structures change; keep adapters for older readers until deprecated. | - Emit model version identifiers in logs when canonical structures change; keep adapters for older readers until deprecated. | ||||||
|  | ## Tests | ||||||
|  | - Author and review coverage in `../StellaOps.Feedser.Models.Tests`. | ||||||
|  | - Shared fixtures (e.g., `MongoIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Feedser.Testing`. | ||||||
|  | - Keep fixtures deterministic; match new cases to real-world advisories or regression scenarios. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -33,7 +33,7 @@ This playbook captures the policies and workflow required when evolving the cano | |||||||
|  |  | ||||||
| ## Testing Checklist | ## Testing Checklist | ||||||
|  |  | ||||||
| - `StellaOps.Feedser.Tests.Models` – update unit tests and golden examples. | - `StellaOps.Feedser.Models.Tests` – update unit tests and golden examples. | ||||||
| - `Serialization determinism` – ensure the hash regression tests cover the new fields. | - `Serialization determinism` – ensure the hash regression tests cover the new fields. | ||||||
| - Exporter integration (`Json`, `TrivyDb`) – confirm manifests include provenance + tree metadata | - Exporter integration (`Json`, `TrivyDb`) – confirm manifests include provenance + tree metadata | ||||||
|   for the new shape. |   for the new shape. | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| using StellaOps.Feedser.Normalization.Identifiers; | using StellaOps.Feedser.Normalization.Identifiers; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Normalization; | namespace StellaOps.Feedser.Normalization.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class CpeNormalizerTests | public sealed class CpeNormalizerTests | ||||||
| { | { | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| using StellaOps.Feedser.Normalization.Cvss; | using StellaOps.Feedser.Normalization.Cvss; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Normalization; | namespace StellaOps.Feedser.Normalization.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class CvssMetricNormalizerTests | public sealed class CvssMetricNormalizerTests | ||||||
| { | { | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using StellaOps.Feedser.Normalization.Distro; | using StellaOps.Feedser.Normalization.Distro; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Normalization; | namespace StellaOps.Feedser.Normalization.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class DebianEvrParserTests | public sealed class DebianEvrParserTests | ||||||
| { | { | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using StellaOps.Feedser.Normalization.Text; | using StellaOps.Feedser.Normalization.Text; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Normalization; | namespace StellaOps.Feedser.Normalization.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class DescriptionNormalizerTests | public sealed class DescriptionNormalizerTests | ||||||
| { | { | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using StellaOps.Feedser.Normalization.Distro; | using StellaOps.Feedser.Normalization.Distro; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Normalization; | namespace StellaOps.Feedser.Normalization.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class NevraParserTests | public sealed class NevraParserTests | ||||||
| { | { | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| using System.Linq; | using System.Linq; | ||||||
| using StellaOps.Feedser.Normalization.Identifiers; | using StellaOps.Feedser.Normalization.Identifiers; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Normalization; | namespace StellaOps.Feedser.Normalization.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class PackageUrlNormalizerTests | public sealed class PackageUrlNormalizerTests | ||||||
| { | { | ||||||
| @@ -0,0 +1,11 @@ | |||||||
|  | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |   <PropertyGroup> | ||||||
|  |     <TargetFramework>net10.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|  |     <Nullable>enable</Nullable> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Models/StellaOps.Feedser.Models.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Normalization/StellaOps.Feedser.Normalization.csproj" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | </Project> | ||||||
| @@ -24,10 +24,10 @@ using StellaOps.Feedser.Storage.Mongo; | |||||||
| using StellaOps.Feedser.Storage.Mongo.Advisories; | using StellaOps.Feedser.Storage.Mongo.Advisories; | ||||||
| using StellaOps.Feedser.Storage.Mongo.Documents; | using StellaOps.Feedser.Storage.Mongo.Documents; | ||||||
| using StellaOps.Feedser.Storage.Mongo.Dtos; | using StellaOps.Feedser.Storage.Mongo.Dtos; | ||||||
| using StellaOps.Feedser.Tests.Storage; | using StellaOps.Feedser.Testing; | ||||||
| using StellaOps.Feedser.Models; | using StellaOps.Feedser.Models; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.CertFr; | namespace StellaOps.Feedser.Source.CertFr.Tests; | ||||||
| 
 | 
 | ||||||
| [Collection("mongo-fixture")] | [Collection("mongo-fixture")] | ||||||
| public sealed class CertFrConnectorTests : IAsyncLifetime | public sealed class CertFrConnectorTests : IAsyncLifetime | ||||||
| @@ -0,0 +1,16 @@ | |||||||
|  | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |   <PropertyGroup> | ||||||
|  |     <TargetFramework>net10.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|  |     <Nullable>enable</Nullable> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Models/StellaOps.Feedser.Models.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Source.CertFr/StellaOps.Feedser.Source.CertFr.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Source.Common/StellaOps.Feedser.Source.Common.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Storage.Mongo/StellaOps.Feedser.Storage.Mongo.csproj" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <None Include="CertFr/Fixtures/**" CopyToOutputDirectory="Always" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | </Project> | ||||||
| @@ -21,3 +21,8 @@ Out: OVAL or package-level authority. | |||||||
| ## Observability & security expectations | ## Observability & security expectations | ||||||
| - Metrics: certfr.fetch.items, certfr.parse.fail, certfr.map.count. | - Metrics: certfr.fetch.items, certfr.parse.fail, certfr.map.count. | ||||||
| - Logs: feed URL(s), item ids/urls, extraction durations; no PII; allowlist hostnames. | - Logs: feed URL(s), item ids/urls, extraction durations; no PII; allowlist hostnames. | ||||||
|  | ## Tests | ||||||
|  | - Author and review coverage in `../StellaOps.Feedser.Source.CertFr.Tests`. | ||||||
|  | - Shared fixtures (e.g., `MongoIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Feedser.Testing`. | ||||||
|  | - Keep fixtures deterministic; match new cases to real-world advisories or regression scenarios. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -26,9 +26,9 @@ using StellaOps.Feedser.Storage.Mongo; | |||||||
| using StellaOps.Feedser.Storage.Mongo.Advisories; | using StellaOps.Feedser.Storage.Mongo.Advisories; | ||||||
| using StellaOps.Feedser.Storage.Mongo.Documents; | using StellaOps.Feedser.Storage.Mongo.Documents; | ||||||
| using StellaOps.Feedser.Storage.Mongo.Dtos; | using StellaOps.Feedser.Storage.Mongo.Dtos; | ||||||
| using StellaOps.Feedser.Tests.Storage; | using StellaOps.Feedser.Testing; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.CertIn; | namespace StellaOps.Feedser.Source.CertIn.Tests; | ||||||
| 
 | 
 | ||||||
| [Collection("mongo-fixture")] | [Collection("mongo-fixture")] | ||||||
| public sealed class CertInConnectorTests : IAsyncLifetime | public sealed class CertInConnectorTests : IAsyncLifetime | ||||||
| @@ -0,0 +1,16 @@ | |||||||
|  | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |   <PropertyGroup> | ||||||
|  |     <TargetFramework>net10.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|  |     <Nullable>enable</Nullable> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Models/StellaOps.Feedser.Models.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Source.CertIn/StellaOps.Feedser.Source.CertIn.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Source.Common/StellaOps.Feedser.Source.Common.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Storage.Mongo/StellaOps.Feedser.Storage.Mongo.csproj" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <None Include="CertIn/Fixtures/**" CopyToOutputDirectory="Always" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | </Project> | ||||||
| @@ -22,3 +22,8 @@ Out: package range authority; scraping behind auth walls. | |||||||
| ## Observability & security expectations | ## Observability & security expectations | ||||||
| - Metrics: certin.fetch.items, certin.parse.fail, certin.map.enriched_count. | - Metrics: certin.fetch.items, certin.parse.fail, certin.map.enriched_count. | ||||||
| - Logs: advisory codes, CVE counts per advisory, timing; allowlist host; redact personal data if present. | - Logs: advisory codes, CVE counts per advisory, timing; allowlist host; redact personal data if present. | ||||||
|  | ## Tests | ||||||
|  | - Author and review coverage in `../StellaOps.Feedser.Source.CertIn.Tests`. | ||||||
|  | - Shared fixtures (e.g., `MongoIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Feedser.Testing`. | ||||||
|  | - Keep fixtures deterministic; match new cases to real-world advisories or regression scenarios. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ using System.Net; | |||||||
| using System.Net.Http; | using System.Net.Http; | ||||||
| using StellaOps.Feedser.Source.Common.Testing; | using StellaOps.Feedser.Source.Common.Testing; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Common; | namespace StellaOps.Feedser.Source.Common.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class CannedHttpMessageHandlerTests | public sealed class CannedHttpMessageHandlerTests | ||||||
| { | { | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using StellaOps.Feedser.Source.Common.Html; | using StellaOps.Feedser.Source.Common.Html; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Common; | namespace StellaOps.Feedser.Source.Common.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class HtmlContentSanitizerTests | public sealed class HtmlContentSanitizerTests | ||||||
| { | { | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| using NuGet.Versioning; | using NuGet.Versioning; | ||||||
| using StellaOps.Feedser.Source.Common.Packages; | using StellaOps.Feedser.Source.Common.Packages; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Common; | namespace StellaOps.Feedser.Source.Common.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class PackageCoordinateHelperTests | public sealed class PackageCoordinateHelperTests | ||||||
| { | { | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using StellaOps.Feedser.Source.Common.Pdf; | using StellaOps.Feedser.Source.Common.Pdf; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Common; | namespace StellaOps.Feedser.Source.Common.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class PdfTextExtractorTests | public sealed class PdfTextExtractorTests | ||||||
| { | { | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using StellaOps.Feedser.Source.Common.Fetch; | using StellaOps.Feedser.Source.Common.Fetch; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Common; | namespace StellaOps.Feedser.Source.Common.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class SourceFetchServiceTests | public sealed class SourceFetchServiceTests | ||||||
| { | { | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| using MongoDB.Bson; | using MongoDB.Bson; | ||||||
| using StellaOps.Feedser.Source.Common.Cursors; | using StellaOps.Feedser.Source.Common.Cursors; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Common; | namespace StellaOps.Feedser.Source.Common.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class TimeWindowCursorPlannerTests | public sealed class TimeWindowCursorPlannerTests | ||||||
| { | { | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using StellaOps.Feedser.Source.Common.Url; | using StellaOps.Feedser.Source.Common.Url; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Common; | namespace StellaOps.Feedser.Source.Common.Tests; | ||||||
| 
 | 
 | ||||||
| public sealed class UrlNormalizerTests | public sealed class UrlNormalizerTests | ||||||
| { | { | ||||||
| @@ -4,7 +4,7 @@ using Json.Schema; | |||||||
| using Microsoft.Extensions.Logging.Abstractions; | using Microsoft.Extensions.Logging.Abstractions; | ||||||
| using StellaOps.Feedser.Source.Common.Json; | using StellaOps.Feedser.Source.Common.Json; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Json; | namespace StellaOps.Feedser.Source.Common.Tests.Json; | ||||||
| 
 | 
 | ||||||
| public sealed class JsonSchemaValidatorTests | public sealed class JsonSchemaValidatorTests | ||||||
| { | { | ||||||
| @@ -0,0 +1,10 @@ | |||||||
|  | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |   <PropertyGroup> | ||||||
|  |     <TargetFramework>net10.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|  |     <Nullable>enable</Nullable> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Source.Common/StellaOps.Feedser.Source.Common.csproj" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | </Project> | ||||||
| @@ -6,7 +6,7 @@ using Microsoft.Extensions.Logging.Abstractions; | |||||||
| using FeedserXmlSchemaValidator = StellaOps.Feedser.Source.Common.Xml.XmlSchemaValidator; | using FeedserXmlSchemaValidator = StellaOps.Feedser.Source.Common.Xml.XmlSchemaValidator; | ||||||
| using FeedserXmlSchemaValidationException = StellaOps.Feedser.Source.Common.Xml.XmlSchemaValidationException; | using FeedserXmlSchemaValidationException = StellaOps.Feedser.Source.Common.Xml.XmlSchemaValidationException; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Xml; | namespace StellaOps.Feedser.Source.Common.Tests.Xml; | ||||||
| 
 | 
 | ||||||
| public sealed class XmlSchemaValidatorTests | public sealed class XmlSchemaValidatorTests | ||||||
| { | { | ||||||
| @@ -25,3 +25,8 @@ Out: connector-specific schemas/mapping rules, merge precedence. | |||||||
| - Metrics: http.req.count, http.retry.count, rate_limit.remaining, validator.fail.count. | - Metrics: http.req.count, http.retry.count, rate_limit.remaining, validator.fail.count. | ||||||
| - Logs include uri, status, retries, etag; redact tokens and auth headers. | - Logs include uri, status, retries, etag; redact tokens and auth headers. | ||||||
| - Distributed tracing hooks and per-connector counters should be wired centrally for consistent observability. | - Distributed tracing hooks and per-connector counters should be wired centrally for consistent observability. | ||||||
|  | ## Tests | ||||||
|  | - Author and review coverage in `../StellaOps.Feedser.Source.Common.Tests`. | ||||||
|  | - Shared fixtures (e.g., `MongoIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Feedser.Testing`. | ||||||
|  | - Keep fixtures deterministic; match new cases to real-world advisories or regression scenarios. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,3 +1,3 @@ | |||||||
| using System.Runtime.CompilerServices; | using System.Runtime.CompilerServices; | ||||||
|  |  | ||||||
| [assembly: InternalsVisibleTo("StellaOps.Feedser.Tests")] | [assembly: InternalsVisibleTo("StellaOps.Feedser.Source.Common.Tests")] | ||||||
|   | |||||||
| @@ -8,10 +8,10 @@ using StellaOps.Feedser.Source.Distro.RedHat; | |||||||
| using StellaOps.Feedser.Source.Distro.RedHat.Configuration; | using StellaOps.Feedser.Source.Distro.RedHat.Configuration; | ||||||
| using StellaOps.Feedser.Storage.Mongo; | using StellaOps.Feedser.Storage.Mongo; | ||||||
| using StellaOps.Feedser.Storage.Mongo.Advisories; | using StellaOps.Feedser.Storage.Mongo.Advisories; | ||||||
| using StellaOps.Feedser.Tests.Source.TestInfrastructure; | using StellaOps.Feedser.Testing; | ||||||
| using StellaOps.Feedser.Tests.Storage; | using StellaOps.Feedser.Testing; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Distro.RedHat; | namespace StellaOps.Feedser.Source.Distro.RedHat.Tests; | ||||||
| 
 | 
 | ||||||
| [Collection("mongo-fixture")] | [Collection("mongo-fixture")] | ||||||
| public sealed class RedHatConnectorHarnessTests : IAsyncLifetime | public sealed class RedHatConnectorHarnessTests : IAsyncLifetime | ||||||
| @@ -21,12 +21,12 @@ using StellaOps.Feedser.Models; | |||||||
| using StellaOps.Feedser.Storage.Mongo; | using StellaOps.Feedser.Storage.Mongo; | ||||||
| using StellaOps.Feedser.Storage.Mongo.Advisories; | using StellaOps.Feedser.Storage.Mongo.Advisories; | ||||||
| using StellaOps.Feedser.Storage.Mongo.Documents; | using StellaOps.Feedser.Storage.Mongo.Documents; | ||||||
| using StellaOps.Feedser.Tests.Storage; | using StellaOps.Feedser.Testing; | ||||||
| using StellaOps.Plugin; | using StellaOps.Plugin; | ||||||
| using Xunit; | using Xunit; | ||||||
| using Xunit.Abstractions; | using Xunit.Abstractions; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Distro.RedHat; | namespace StellaOps.Feedser.Source.Distro.RedHat.Tests; | ||||||
| 
 | 
 | ||||||
| [Collection("mongo-fixture")] | [Collection("mongo-fixture")] | ||||||
| public sealed class RedHatConnectorTests : IAsyncLifetime | public sealed class RedHatConnectorTests : IAsyncLifetime | ||||||
| @@ -0,0 +1,16 @@ | |||||||
|  | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |   <PropertyGroup> | ||||||
|  |     <TargetFramework>net10.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|  |     <Nullable>enable</Nullable> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Models/StellaOps.Feedser.Models.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Source.Common/StellaOps.Feedser.Source.Common.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Source.Distro.RedHat/StellaOps.Feedser.Source.Distro.RedHat.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Storage.Mongo/StellaOps.Feedser.Storage.Mongo.csproj" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <None Include="RedHat/Fixtures/*.json" CopyToOutputDirectory="Always" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | </Project> | ||||||
| @@ -21,3 +21,8 @@ Out: building RPM artifacts; cross-distro reconciliation beyond Red Hat. | |||||||
| ## Observability & security expectations | ## Observability & security expectations | ||||||
| - Metrics: redhat.fetch.items, redhat.oval.defs, redhat.parse.fail, redhat.map.affected_rpm. | - Metrics: redhat.fetch.items, redhat.oval.defs, redhat.parse.fail, redhat.map.affected_rpm. | ||||||
| - Logs: cursor bounds, advisory ids, NEVRA counts; allowlist Red Hat endpoints. | - Logs: cursor bounds, advisory ids, NEVRA counts; allowlist Red Hat endpoints. | ||||||
|  | ## Tests | ||||||
|  | - Author and review coverage in `../StellaOps.Feedser.Source.Distro.RedHat.Tests`. | ||||||
|  | - Shared fixtures (e.g., `MongoIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Feedser.Testing`. | ||||||
|  | - Keep fixtures deterministic; match new cases to real-world advisories or regression scenarios. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -23,9 +23,9 @@ using StellaOps.Feedser.Storage.Mongo; | |||||||
| using StellaOps.Feedser.Storage.Mongo.Advisories; | using StellaOps.Feedser.Storage.Mongo.Advisories; | ||||||
| using StellaOps.Feedser.Storage.Mongo.Documents; | using StellaOps.Feedser.Storage.Mongo.Documents; | ||||||
| using StellaOps.Feedser.Storage.Mongo.Dtos; | using StellaOps.Feedser.Storage.Mongo.Dtos; | ||||||
| using StellaOps.Feedser.Tests.Storage; | using StellaOps.Feedser.Testing; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Ics.Kaspersky; | namespace StellaOps.Feedser.Source.Ics.Kaspersky.Tests; | ||||||
| 
 | 
 | ||||||
| [Collection("mongo-fixture")] | [Collection("mongo-fixture")] | ||||||
| public sealed class KasperskyConnectorTests : IAsyncLifetime | public sealed class KasperskyConnectorTests : IAsyncLifetime | ||||||
| @@ -0,0 +1,16 @@ | |||||||
|  | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |   <PropertyGroup> | ||||||
|  |     <TargetFramework>net10.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|  |     <Nullable>enable</Nullable> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Models/StellaOps.Feedser.Models.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Source.Common/StellaOps.Feedser.Source.Common.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Source.Ics.Kaspersky/StellaOps.Feedser.Source.Ics.Kaspersky.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Storage.Mongo/StellaOps.Feedser.Storage.Mongo.csproj" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <None Include="Kaspersky/Fixtures/**" CopyToOutputDirectory="Always" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | </Project> | ||||||
| @@ -22,3 +22,8 @@ Out: firmware downloads; reverse-engineering artifacts. | |||||||
| ## Observability & security expectations | ## Observability & security expectations | ||||||
| - Metrics: icsk.fetch.items, icsk.parse.fail, icsk.map.affected_count. | - Metrics: icsk.fetch.items, icsk.parse.fail, icsk.map.affected_count. | ||||||
| - Logs: slugs, vendor/product counts, timing; allowlist host. | - Logs: slugs, vendor/product counts, timing; allowlist host. | ||||||
|  | ## Tests | ||||||
|  | - Author and review coverage in `../StellaOps.Feedser.Source.Ics.Kaspersky.Tests`. | ||||||
|  | - Shared fixtures (e.g., `MongoIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Feedser.Testing`. | ||||||
|  | - Keep fixtures deterministic; match new cases to real-world advisories or regression scenarios. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -25,9 +25,9 @@ using StellaOps.Feedser.Storage.Mongo.Documents; | |||||||
| using StellaOps.Feedser.Storage.Mongo.Dtos; | using StellaOps.Feedser.Storage.Mongo.Dtos; | ||||||
| using StellaOps.Feedser.Storage.Mongo.JpFlags; | using StellaOps.Feedser.Storage.Mongo.JpFlags; | ||||||
| using Xunit.Abstractions; | using Xunit.Abstractions; | ||||||
| using StellaOps.Feedser.Tests.Storage; | using StellaOps.Feedser.Testing; | ||||||
| 
 | 
 | ||||||
| namespace StellaOps.Feedser.Tests.Source.Jvn; | namespace StellaOps.Feedser.Source.Jvn.Tests; | ||||||
| 
 | 
 | ||||||
| [Collection("mongo-fixture")] | [Collection("mongo-fixture")] | ||||||
| public sealed class JvnConnectorTests : IAsyncLifetime | public sealed class JvnConnectorTests : IAsyncLifetime | ||||||
| @@ -0,0 +1,16 @@ | |||||||
|  | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
|  |   <PropertyGroup> | ||||||
|  |     <TargetFramework>net10.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|  |     <Nullable>enable</Nullable> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Models/StellaOps.Feedser.Models.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Source.Common/StellaOps.Feedser.Source.Common.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Source.Jvn/StellaOps.Feedser.Source.Jvn.csproj" /> | ||||||
|  |     <ProjectReference Include="../StellaOps.Feedser.Storage.Mongo/StellaOps.Feedser.Storage.Mongo.csproj" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <None Include="Jvn/Fixtures/**" CopyToOutputDirectory="Always" /> | ||||||
|  |   </ItemGroup> | ||||||
|  | </Project> | ||||||
| @@ -23,3 +23,8 @@ Out: overriding distro or PSIRT ranges without concrete evidence; scraping unoff | |||||||
| ## Observability & security expectations | ## Observability & security expectations | ||||||
| - Metrics: jvn.fetch.requests, jvn.items, jvn.parse.fail, jvn.map.enriched_count, jvn.flags.jp_count. | - Metrics: jvn.fetch.requests, jvn.items, jvn.parse.fail, jvn.map.enriched_count, jvn.flags.jp_count. | ||||||
| - Logs: window bounds, jvndb ids processed, vendor_status distribution; redact API keys. | - Logs: window bounds, jvndb ids processed, vendor_status distribution; redact API keys. | ||||||
|  | ## Tests | ||||||
|  | - Author and review coverage in `../StellaOps.Feedser.Source.Jvn.Tests`. | ||||||
|  | - Shared fixtures (e.g., `MongoIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Feedser.Testing`. | ||||||
|  | - Keep fixtures deterministic; match new cases to real-world advisories or regression scenarios. | ||||||
|  |  | ||||||
|   | |||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user