stabilize tests

This commit is contained in:
master
2026-02-01 21:37:40 +02:00
parent 55744f6a39
commit 5d5e80b2e4
6435 changed files with 33984 additions and 13802 deletions

View File

@@ -0,0 +1,19 @@
# StellaOps.Cryptography.Tests Agent Charter
## Mission
Provide deterministic unit and integration tests for cryptographic operations, signing, verification, and HSM integration.
## Required Reading
- `docs/modules/cryptography/architecture.md`
- `docs/modules/cryptography/multi-profile-signing-specification.md`
- `docs/modules/platform/architecture-overview.md`
## Working Agreement
- Update sprint status in `docs/implplan/SPRINT_*.md` and local TASKS.md.
- Keep tests deterministic (fixed keys/vectors, stable ordering).
- Add vectors for signing/verification, negative cases, and determinism.
## Known Quirks
- **Q4 — PKCS#11 HSM test hang**: `Pkcs11HsmClientIntegrationTests` requires SoftHSM2 installed and the `STELLAOPS_SOFTHSM_LIB` environment variable set. Without SoftHSM2, the PKCS#11 native library probing can hang the test runner during static initialization. The `MechanismFactory` in `Pkcs11HsmClientImpl.cs` uses `Lazy<Pkcs11InteropFactories>` to defer native probing until first use. HSM tests are tagged `[Trait("Category", "HsmIntegration")]` and excluded from default CI runs.
- **CI filter**: Default test commands exclude HSM tests: `dotnet test --filter "Category!=HsmIntegration"`.
- **To run HSM tests**: Install SoftHSM2, set `STELLAOPS_SOFTHSM_LIB` to the library path, then run without the filter.

View File

@@ -11,6 +11,7 @@ using Xunit;
namespace StellaOps.Cryptography.Tests.Hsm;
[Trait("Category", "Integration")]
[Trait("Category", "HsmIntegration")]
public sealed class Pkcs11HsmClientIntegrationTests
{
[Fact]

View File

@@ -0,0 +1,8 @@
# StellaOps.Cryptography.Tests Task Board
This board mirrors active sprint tasks for this module.
Source of truth: `docs/implplan/SPRINT_20260130_002_Tools_csproj_remediation_solid_review.md`.
| Task ID | Status | Notes |
| --- | --- | --- |
| REMED-05 | TODO | Remediation checklist: docs/implplan/audits/csproj-standards/remediation/checklists/src/Cryptography/__Tests/StellaOps.Cryptography.Tests/StellaOps.Cryptography.Tests.md. |
| REMED-06 | DONE | SOLID review notes captured for SPRINT_20260130_002. |