docs consolidation
This commit is contained in:
@@ -5,6 +5,6 @@ Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| AUDIT-0362-M | DONE | Maintainability audit for Integration.AirGap. |
|
||||
| AUDIT-0362-T | DONE | Test coverage audit for Integration.AirGap. |
|
||||
| AUDIT-0362-A | DONE | Waived (test project). |
|
||||
| AUDIT-0362-M | DONE | Revalidated 2026-01-07; maintainability audit for Integration.AirGap. |
|
||||
| AUDIT-0362-T | DONE | Revalidated 2026-01-07; test coverage audit for Integration.AirGap. |
|
||||
| AUDIT-0362-A | DONE | Waived (test project; revalidated 2026-01-07). |
|
||||
|
||||
@@ -5,6 +5,6 @@ Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| AUDIT-0363-M | DONE | Maintainability audit for Integration.Determinism. |
|
||||
| AUDIT-0363-T | DONE | Test coverage audit for Integration.Determinism. |
|
||||
| AUDIT-0363-A | DONE | Waived (test project). |
|
||||
| AUDIT-0363-M | DONE | Revalidated 2026-01-07; maintainability audit for Integration.Determinism. |
|
||||
| AUDIT-0363-T | DONE | Revalidated 2026-01-07; test coverage audit for Integration.Determinism. |
|
||||
| AUDIT-0363-A | DONE | Waived (test project; revalidated 2026-01-07). |
|
||||
|
||||
@@ -5,6 +5,6 @@ Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| AUDIT-0364-M | DONE | Maintainability audit for Integration.E2E. |
|
||||
| AUDIT-0364-T | DONE | Test coverage audit for Integration.E2E. |
|
||||
| AUDIT-0364-A | DONE | Waived (test project). |
|
||||
| AUDIT-0364-M | DONE | Revalidated 2026-01-07; maintainability audit for Integration.E2E. |
|
||||
| AUDIT-0364-T | DONE | Revalidated 2026-01-07; test coverage audit for Integration.E2E. |
|
||||
| AUDIT-0364-A | DONE | Waived (test project; revalidated 2026-01-07). |
|
||||
|
||||
@@ -5,6 +5,6 @@ Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| AUDIT-0365-M | DONE | Maintainability audit for Integration.Performance. |
|
||||
| AUDIT-0365-T | DONE | Test coverage audit for Integration.Performance. |
|
||||
| AUDIT-0365-A | DONE | Waived (test project). |
|
||||
| AUDIT-0365-M | DONE | Revalidated 2026-01-07; maintainability audit for Integration.Performance. |
|
||||
| AUDIT-0365-T | DONE | Revalidated 2026-01-07; test coverage audit for Integration.Performance. |
|
||||
| AUDIT-0365-A | DONE | Waived (test project; revalidated 2026-01-07). |
|
||||
|
||||
@@ -59,7 +59,7 @@ public class PostgresOnlyStartupTests : IAsyncLifetime
|
||||
|
||||
// Verify connection works
|
||||
using var connection = new Npgsql.NpgsqlConnection(_connectionString);
|
||||
await connection.OpenAsync();
|
||||
await connection.OpenAsync(TestContext.Current.CancellationToken);
|
||||
connection.State.Should().Be(System.Data.ConnectionState.Open);
|
||||
}
|
||||
|
||||
@@ -78,13 +78,14 @@ public class PostgresOnlyStartupTests : IAsyncLifetime
|
||||
public async Task Database_CanCreateAndVerifySchema()
|
||||
{
|
||||
// Arrange
|
||||
var ct = TestContext.Current.CancellationToken;
|
||||
using var connection = new Npgsql.NpgsqlConnection(_connectionString);
|
||||
await connection.OpenAsync();
|
||||
await connection.OpenAsync(ct);
|
||||
|
||||
// Act - Create a test schema
|
||||
using var createCmd = connection.CreateCommand();
|
||||
createCmd.CommandText = "CREATE SCHEMA IF NOT EXISTS test_platform";
|
||||
await createCmd.ExecuteNonQueryAsync();
|
||||
await createCmd.ExecuteNonQueryAsync(ct);
|
||||
|
||||
// Assert - Verify schema exists
|
||||
using var verifyCmd = connection.CreateCommand();
|
||||
@@ -92,7 +93,7 @@ public class PostgresOnlyStartupTests : IAsyncLifetime
|
||||
SELECT schema_name
|
||||
FROM information_schema.schemata
|
||||
WHERE schema_name = 'test_platform'";
|
||||
var result = await verifyCmd.ExecuteScalarAsync();
|
||||
var result = await verifyCmd.ExecuteScalarAsync(ct);
|
||||
result.Should().Be("test_platform");
|
||||
}
|
||||
|
||||
@@ -100,8 +101,9 @@ public class PostgresOnlyStartupTests : IAsyncLifetime
|
||||
public async Task Database_CanPerformCrudOperations()
|
||||
{
|
||||
// Arrange
|
||||
var ct = TestContext.Current.CancellationToken;
|
||||
using var connection = new Npgsql.NpgsqlConnection(_connectionString);
|
||||
await connection.OpenAsync();
|
||||
await connection.OpenAsync(ct);
|
||||
|
||||
// Create test table
|
||||
using var createCmd = connection.CreateCommand();
|
||||
@@ -111,33 +113,33 @@ public class PostgresOnlyStartupTests : IAsyncLifetime
|
||||
name VARCHAR(100) NOT NULL,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW()
|
||||
)";
|
||||
await createCmd.ExecuteNonQueryAsync();
|
||||
await createCmd.ExecuteNonQueryAsync(ct);
|
||||
|
||||
// Act - Insert
|
||||
using var insertCmd = connection.CreateCommand();
|
||||
insertCmd.CommandText = "INSERT INTO test_crud (name) VALUES ('test-record') RETURNING id";
|
||||
var insertedId = await insertCmd.ExecuteScalarAsync();
|
||||
var insertedId = await insertCmd.ExecuteScalarAsync(ct);
|
||||
insertedId.Should().NotBeNull();
|
||||
|
||||
// Act - Select
|
||||
using var selectCmd = connection.CreateCommand();
|
||||
selectCmd.CommandText = "SELECT name FROM test_crud WHERE id = @id";
|
||||
selectCmd.Parameters.AddWithValue("id", insertedId!);
|
||||
var name = await selectCmd.ExecuteScalarAsync();
|
||||
var name = await selectCmd.ExecuteScalarAsync(ct);
|
||||
name.Should().Be("test-record");
|
||||
|
||||
// Act - Update
|
||||
using var updateCmd = connection.CreateCommand();
|
||||
updateCmd.CommandText = "UPDATE test_crud SET name = 'updated-record' WHERE id = @id";
|
||||
updateCmd.Parameters.AddWithValue("id", insertedId!);
|
||||
var rowsAffected = await updateCmd.ExecuteNonQueryAsync();
|
||||
var rowsAffected = await updateCmd.ExecuteNonQueryAsync(ct);
|
||||
rowsAffected.Should().Be(1);
|
||||
|
||||
// Act - Delete
|
||||
using var deleteCmd = connection.CreateCommand();
|
||||
deleteCmd.CommandText = "DELETE FROM test_crud WHERE id = @id";
|
||||
deleteCmd.Parameters.AddWithValue("id", insertedId!);
|
||||
rowsAffected = await deleteCmd.ExecuteNonQueryAsync();
|
||||
rowsAffected = await deleteCmd.ExecuteNonQueryAsync(ct);
|
||||
rowsAffected.Should().Be(1);
|
||||
}
|
||||
|
||||
@@ -149,8 +151,9 @@ public class PostgresOnlyStartupTests : IAsyncLifetime
|
||||
public async Task Database_CanRunDdlMigrations()
|
||||
{
|
||||
// Arrange
|
||||
var ct = TestContext.Current.CancellationToken;
|
||||
using var connection = new Npgsql.NpgsqlConnection(_connectionString);
|
||||
await connection.OpenAsync();
|
||||
await connection.OpenAsync(ct);
|
||||
|
||||
// Act - Run a migration-like DDL script
|
||||
var migrationScript = @"
|
||||
@@ -177,12 +180,12 @@ public class PostgresOnlyStartupTests : IAsyncLifetime
|
||||
|
||||
using var migrateCmd = connection.CreateCommand();
|
||||
migrateCmd.CommandText = migrationScript;
|
||||
await migrateCmd.ExecuteNonQueryAsync();
|
||||
await migrateCmd.ExecuteNonQueryAsync(ct);
|
||||
|
||||
// Assert - Verify migration recorded
|
||||
using var verifyCmd = connection.CreateCommand();
|
||||
verifyCmd.CommandText = "SELECT COUNT(*) FROM schema_migrations WHERE version = 'V2_create_scan_results'";
|
||||
var count = await verifyCmd.ExecuteScalarAsync();
|
||||
var count = await verifyCmd.ExecuteScalarAsync(ct);
|
||||
Convert.ToInt32(count).Should().Be(1);
|
||||
}
|
||||
|
||||
@@ -190,18 +193,19 @@ public class PostgresOnlyStartupTests : IAsyncLifetime
|
||||
public async Task Database_CanCreateExtensions()
|
||||
{
|
||||
// Arrange
|
||||
var ct = TestContext.Current.CancellationToken;
|
||||
using var connection = new Npgsql.NpgsqlConnection(_connectionString);
|
||||
await connection.OpenAsync();
|
||||
await connection.OpenAsync(ct);
|
||||
|
||||
// Act - Create common extensions used by StellaOps
|
||||
using var extCmd = connection.CreateCommand();
|
||||
extCmd.CommandText = "CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\"";
|
||||
await extCmd.ExecuteNonQueryAsync();
|
||||
await extCmd.ExecuteNonQueryAsync(ct);
|
||||
|
||||
// Assert - Verify extension exists
|
||||
using var verifyCmd = connection.CreateCommand();
|
||||
verifyCmd.CommandText = "SELECT COUNT(*) FROM pg_extension WHERE extname = 'uuid-ossp'";
|
||||
var count = await verifyCmd.ExecuteScalarAsync();
|
||||
var count = await verifyCmd.ExecuteScalarAsync(ct);
|
||||
Convert.ToInt32(count).Should().Be(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@ Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| AUDIT-0366-M | DONE | Maintainability audit for Integration.Platform. |
|
||||
| AUDIT-0366-T | DONE | Test coverage audit for Integration.Platform. |
|
||||
| AUDIT-0366-A | DONE | Waived (test project). |
|
||||
| AUDIT-0366-M | DONE | Revalidated 2026-01-07; maintainability audit for Integration.Platform. |
|
||||
| AUDIT-0366-T | DONE | Revalidated 2026-01-07; test coverage audit for Integration.Platform. |
|
||||
| AUDIT-0366-A | DONE | Waived (test project; revalidated 2026-01-07). |
|
||||
|
||||
@@ -5,6 +5,6 @@ Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| AUDIT-0367-M | DONE | Maintainability audit for Integration.ProofChain. |
|
||||
| AUDIT-0367-T | DONE | Test coverage audit for Integration.ProofChain. |
|
||||
| AUDIT-0367-A | DONE | Waived (test project). |
|
||||
| AUDIT-0367-M | DONE | Revalidated 2026-01-07; maintainability audit for Integration.ProofChain. |
|
||||
| AUDIT-0367-T | DONE | Revalidated 2026-01-07; test coverage audit for Integration.ProofChain. |
|
||||
| AUDIT-0367-A | DONE | Waived (test project; revalidated 2026-01-07). |
|
||||
|
||||
@@ -5,6 +5,6 @@ Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| AUDIT-0368-M | DONE | Maintainability audit for Integration.Reachability. |
|
||||
| AUDIT-0368-T | DONE | Test coverage audit for Integration.Reachability. |
|
||||
| AUDIT-0368-A | DONE | Waived (test project). |
|
||||
| AUDIT-0368-M | DONE | Revalidated 2026-01-07; maintainability audit for Integration.Reachability. |
|
||||
| AUDIT-0368-T | DONE | Revalidated 2026-01-07; test coverage audit for Integration.Reachability. |
|
||||
| AUDIT-0368-A | DONE | Waived (test project; revalidated 2026-01-07). |
|
||||
|
||||
@@ -5,6 +5,6 @@ Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| AUDIT-0369-M | DONE | Maintainability audit for Integration.Unknowns. |
|
||||
| AUDIT-0369-T | DONE | Test coverage audit for Integration.Unknowns. |
|
||||
| AUDIT-0369-A | DONE | Waived (test project). |
|
||||
| AUDIT-0369-M | DONE | Revalidated 2026-01-07; maintainability audit for Integration.Unknowns. |
|
||||
| AUDIT-0369-T | DONE | Revalidated 2026-01-07; test coverage audit for Integration.Unknowns. |
|
||||
| AUDIT-0369-A | DONE | Waived (test project; revalidated 2026-01-07). |
|
||||
|
||||
Reference in New Issue
Block a user