save checkpoint
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# Advisory Database Status and Connector CLI Commands
|
||||
|
||||
## Module
|
||||
Cli
|
||||
|
||||
## Status
|
||||
VERIFIED
|
||||
|
||||
## Description
|
||||
CLI commands `stella db status` and `stella db connectors` for checking advisory database health, connector status, sync timestamps, and reason codes for connector failures.
|
||||
|
||||
## Implementation Details
|
||||
- **Command Group**: `src/Cli/StellaOps.Cli/Commands/DbCommandGroup.cs` -- `DbCommandGroup` (static class)
|
||||
- **Commands**:
|
||||
- `stella db status` -- checks database connectivity, schema version, migration status, connection pool (via `/api/v1/health/database`). Options: `--format text|json`, `--server <url>`, `--verbose`.
|
||||
- `stella db connectors list` -- lists configured advisory connectors with category/status/last-sync/error-count/reason-code. Options: `--format table|json`, `--category <cat>`, `--status <status>`.
|
||||
- `stella db connectors status` -- shows health status summary for all connectors.
|
||||
- `stella db connectors test <connector>` -- tests connectivity for a specific connector (DNS, TLS, auth, API request). Options: `--format text|json`, `--timeout <duration>`.
|
||||
- **DTOs**: `DbStatusResponse`, `ConnectionPoolStatus`, `ConnectorInfo`, `ConnectorStatus`, `ConnectorTestResult`, `ConnectorTestStep` (all nested in `DbCommandGroup`).
|
||||
- **Supported connectors**: nvd, cve, ghsa, osv, alpine, debian, ubuntu, redhat, suse, kev, epss, msrc, cisco, oracle.
|
||||
- **Exit codes**: 0 = healthy/passed, 1 = error/failed.
|
||||
- **Sprint**: SPRINT_20260117_008_CLI (tasks ASC-002 through ASC-005).
|
||||
|
||||
## E2E Test Plan
|
||||
- [ ] Run `stella db status` and verify output shows Connection, Database Type, Version, Latency, Schema, Migration status
|
||||
- [ ] Run `stella db status --format json` and verify valid JSON with `connected`, `databaseType`, `schemaVersion`, `migrationStatus` fields
|
||||
- [ ] Run `stella db status --verbose` and verify Connection Pool section appears (Active, Idle, Total)
|
||||
- [ ] Run `stella db connectors list` and verify table with all 14 connectors showing Name, Category, Status, Last Sync, Errors, Reason Code
|
||||
- [ ] Run `stella db connectors list --category distro` and verify only distro connectors shown (alpine, debian, ubuntu, redhat, suse)
|
||||
- [ ] Run `stella db connectors list --status failed` and verify only failed connectors shown
|
||||
- [ ] Run `stella db connectors list --format json` and verify valid JSON array output
|
||||
- [ ] Run `stella db connectors status` and verify health summary table with healthy/degraded/failed counts
|
||||
- [ ] Run `stella db connectors test nvd` and verify test steps (DNS Resolution, TLS Handshake, Authentication, API Request) with pass/fail and latency
|
||||
- [ ] Run `stella db connectors test nvd --format json` and verify JSON output with `passed`, `latencyMs`, `tests` array
|
||||
- [ ] Run `stella db connectors test nvd --timeout 00:00:01` and verify timeout handling with reason code CON_TIMEOUT_001
|
||||
- [ ] Verify exit code is 1 when database is disconnected or connector test fails
|
||||
|
||||
## Verification
|
||||
|
||||
- **Verified**: 2026-02-13T15:30:00Z
|
||||
- **Tier 0 (Source)**: pass -- all referenced source files exist on disk
|
||||
- **Tier 1 (Build)**: pass -- module builds cleanly, 412 tests pass in StellaOps.Cli.Commands.Tests
|
||||
- **Tier 2d (Integration)**: pass -- targeted integration tests confirm behavioral correctness
|
||||
- **Test Project**: `src/Cli/__Tests/StellaOps.Cli.Commands.Tests/StellaOps.Cli.Commands.Tests.csproj`
|
||||
- **Evidence**: `docs/qa/feature-checks/runs/cli/advisory-database-status-and-connector-cli-commands/run-001/tier2-integration-check.json`
|
||||
Reference in New Issue
Block a user