Add unit and integration tests for VexCandidateEmitter and SmartDiff repositories
- Implemented comprehensive unit tests for VexCandidateEmitter to validate candidate emission logic based on various scenarios including absent and present APIs, confidence thresholds, and rate limiting. - Added integration tests for SmartDiff PostgreSQL repositories, covering snapshot storage and retrieval, candidate storage, and material risk change handling. - Ensured tests validate correct behavior for storing, retrieving, and querying snapshots and candidates, including edge cases and expected outcomes.
This commit is contained in:
@@ -10,7 +10,7 @@ Shared connector toolkit. Provides HTTP clients, retry/backoff, conditional GET
|
||||
- HTML sanitization, URL normalization, and PDF-to-text extraction utilities for feeds that require cleanup before validation.
|
||||
## Participants
|
||||
- Source.* connectors (NVD, Red Hat, JVN, PSIRTs, CERTs, ICS).
|
||||
- Storage.Mongo (document/dto repositories using shared shapes).
|
||||
- Storage.Postgres (document/dto repositories using shared shapes).
|
||||
- Core (jobs schedule/trigger for connectors).
|
||||
- QA (canned HTTP server harness, schema fixtures).
|
||||
## Interfaces & contracts
|
||||
@@ -27,7 +27,7 @@ Out: connector-specific schemas/mapping rules, merge precedence.
|
||||
- Distributed tracing hooks and per-connector counters should be wired centrally for consistent observability.
|
||||
## Tests
|
||||
- Author and review coverage in `../StellaOps.Concelier.Connector.Common.Tests`.
|
||||
- Shared fixtures (e.g., `MongoIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Concelier.Testing`.
|
||||
- Shared fixtures (e.g., `PostgresIntegrationFixture`, `ConnectorTestHarness`) live in `../StellaOps.Concelier.Testing`.
|
||||
- Keep fixtures deterministic; match new cases to real-world advisories or regression scenarios.
|
||||
|
||||
## Required Reading
|
||||
|
||||
Reference in New Issue
Block a user