mirror of
https://github.com/azaion/missions.git
synced 2026-06-21 06:41:07 +00:00
ccd85a09df
ci/woodpecker/push/build-arm Pipeline failed
Scaffold the blackbox test project the rest of epic AZ-575 (AZ-577..AZ-586) will build on. Two new csprojs under tests/, plus the TLS materials and TRX->CSV reporting hand-off the existing docker-compose.test.yml already calls for. JWKS mock (tests/Azaion.Missions.JwksMock/): - ASP.NET Core minimal API on .NET 10, no NuGet deps; JWS is hand-rolled to keep the surface tight and avoid version drift with the SUT - KeyStore with one in-memory ECDSA P-256 keypair + retired-key grace window for NFT-RES-07 / NFT-SEC-11 rotation observability - Endpoints: GET /.well-known/jwks.json, POST /sign, POST /rotate-key - Mock-only alg_override / kid_override switches drive NFT-SEC-09/10/11 - TLS keypair committed under tls/; tests/jwks-mock-ca.crt is a copy mounted into both missions and e2e-consumer per docker-compose.test.yml E2E consumer (tests/Azaion.Missions.E2E.Tests/): - xUnit 2.9.2 + Bogus 35.6.1 + Npgsql 10.0.2 + Xunit.SkippableFact 1.4.13 - TestBase / TokenMinter scaffolding for downstream tasks - Fixtures/ for DbReset, DbSeed, ComposeRestart, JwksRotate, JwksMockReverse - Helpers/ for DbAssertions (side-channel), HttpAssertions, FixtureSql - 8 Tests/<category>/Sanity.cs discovery smoke tests (AC-3) - Tests/InfrastructureSanity.cs SkippableFacts for AC-1/2/5/6 - Tests/AaaPatternEnforcement.cs greps source files for AC-7 - Tests/Reporting/TrxToCsvPostProcessorTests.cs covers AC-4 - Reporting/TrxToCsvPostProcessor.cs handles VSTest TRX -> environment.md CSV; xUnit traits are not propagated by the TRX logger so the converter reflects them out of the test DLL via GetCustomAttributesData - Reporting.Cli/ is a separate console csproj that links the converter source files (test project excludes Reporting.Cli/** from compile) - Dockerfile + entrypoint.sh wire dotnet test -> trx -> csv inside the e2e-consumer container the compose file already references Local verification: 13 pass, 3 skip (with explicit reasons), 0 fail. End-to-end TRX->CSV manually verified against environment.md header spec. Docker stack build is handed off to autodev Step 7 (test-run skill). Reports under _docs/03_implementation/. AZ-576 task spec moved to _docs/tasks/done/. Co-authored-by: Cursor <cursoragent@cursor.com>
42 lines
1.3 KiB
Bash
Executable File
42 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env sh
|
|
## e2e-consumer entrypoint.
|
|
## 1. Run xUnit suite with TRX + console loggers.
|
|
## 2. Convert TRX -> the flat CSV documented in environment.md § Reporting.
|
|
## 3. Propagate the test exit code.
|
|
##
|
|
## Failure surface:
|
|
## - dotnet test returns non-zero on any test failure.
|
|
## - The CSV step still runs so the report captures whatever DID execute.
|
|
## - Final exit code is the dotnet test exit code (CSV failures are logged
|
|
## but do NOT mask test failures).
|
|
set -eu
|
|
|
|
mkdir -p "$RESULTS_DIR"
|
|
|
|
set +e
|
|
dotnet test /src/Azaion.Missions.E2E.Tests.csproj \
|
|
--no-build \
|
|
--configuration Release \
|
|
--logger "trx;LogFileName=results.trx" \
|
|
--logger "console;verbosity=normal" \
|
|
--results-directory "$RESULTS_DIR"
|
|
TEST_EXIT=$?
|
|
set -e
|
|
|
|
TRX_FILE="$RESULTS_DIR/results.trx"
|
|
CSV_FILE="$RESULTS_DIR/report.csv"
|
|
TEST_DLL="/src/bin/Release/net10.0/Azaion.Missions.E2E.Tests.dll"
|
|
|
|
if [ -f "$TRX_FILE" ]; then
|
|
if dotnet /app/cli/Azaion.Missions.E2E.Reporting.Cli.dll "$TRX_FILE" "$CSV_FILE" "$TEST_DLL"; then
|
|
echo "[entrypoint] CSV report at $CSV_FILE"
|
|
else
|
|
cli_exit=$?
|
|
echo "[entrypoint] WARNING: trx -> csv conversion exited $cli_exit; tests still report their own verdict." >&2
|
|
fi
|
|
else
|
|
echo "[entrypoint] WARNING: $TRX_FILE not found; xUnit may not have produced any results." >&2
|
|
fi
|
|
|
|
exit "$TEST_EXIT"
|