mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-22 20:31:14 +00:00
[AZ-285] Test infrastructure: scaffold unit test project + fixtures
- Add SatelliteProvider.DataAccess project reference to test csproj
(enables mocking ITileRepository / IRegionRepository / IRouteRepository)
- Replace DummyTest placeholder with InfrastructureTests covering:
* All mockable interfaces (ISatelliteDownloader, repos, queue, services)
can be mocked via Moq
* TileService can be constructed with mocked dependencies
* Test coordinate fixtures load with expected values
- Add Fixtures/TestCoordinates.cs with REG-01..REG-03 + ROUTE-01/04/06
shared test data
- Archive AZ-285 to _docs/02_tasks/done/
- Batch 1 review report: PASS_WITH_WARNINGS (Low/Spec-Gap deferred AC-2,
Low/Maintainability pre-existing FluentAssertions 8.x license note)
Verification: docker dotnet test run — 4/4 tests pass in 2.35s.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
# Code Review Report
|
||||
|
||||
**Batch**: 1 — AZ-285 Test Infrastructure
|
||||
**Date**: 2026-05-10
|
||||
**Verdict**: PASS_WITH_WARNINGS
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Severity | Category | File:Line | Title |
|
||||
|---|----------|----------|-----------|-------|
|
||||
| 1 | Low | Spec-Gap | (deferred) | AC-2 (docker-compose tests succeed) deferred to Step 7 |
|
||||
| 2 | Low | Maintainability | SatelliteProvider.Tests/SatelliteProvider.Tests.csproj | FluentAssertions 8.x licensing — pre-existing, surfaces in test output |
|
||||
|
||||
### Finding Details
|
||||
|
||||
**F1: AC-2 deferred to Step 7** (Low / Spec-Gap)
|
||||
- Location: out-of-batch
|
||||
- Description: AZ-285 AC-2 requires `docker-compose -f docker-compose.yml -f docker-compose.tests.yml up --build --abort-on-container-exit` to succeed. This batch only validates the unit test path via a plain `mcr.microsoft.com/dotnet/sdk:8.0` container. The full compose stack runs against the API + Postgres in Step 7 (Run Tests).
|
||||
- Suggestion: Verify in Step 7 by running `scripts/run-tests.sh` (the full path).
|
||||
- Task: AZ-285
|
||||
|
||||
**F2: FluentAssertions 8.x commercial-use license** (Low / Maintainability)
|
||||
- Location: `SatelliteProvider.Tests/SatelliteProvider.Tests.csproj`
|
||||
- Description: FluentAssertions 8.x was relicensed under Xceed Community License — free for non-commercial use only. The test runner emits this notice. Version was set pre-autodev; this batch did not introduce it.
|
||||
- Suggestion: For commercial-use projects, downgrade to FluentAssertions 7.x or migrate to Shouldly / Verify. Decision belongs to the user (not in scope for AZ-285).
|
||||
- Task: pre-existing
|
||||
|
||||
## Phase Summary
|
||||
|
||||
- **Phase 1 (Context)**: AZ-285 spec loaded, ACs identified.
|
||||
- **Phase 2 (Spec compliance)**: AC-1 ✓ (project builds, mocks resolve — verified by `AllMockableInterfaces_CanBeMocked` + `TileService_ConstructsWithMockedDependencies`); AC-3 ✓ (4 tests discovered + executed); AC-2 deferred (F1).
|
||||
- **Phase 3 (Quality)**: simple, focused fixtures and smoke tests; no SOLID violations.
|
||||
- **Phase 4 (Security)**: no secrets, no injection vectors in test code.
|
||||
- **Phase 5 (Performance)**: N/A for test infrastructure.
|
||||
- **Phase 6 (Cross-task)**: single task in batch.
|
||||
- **Phase 7 (Architecture)**: test project's references (Common, Services, DataAccess) all hit Public APIs; no layering violation; no new cycles.
|
||||
|
||||
## Test Run
|
||||
|
||||
Container: `mcr.microsoft.com/dotnet/sdk:8.0`
|
||||
- Restored: 4 projects
|
||||
- Built: 4 projects (Common, DataAccess, Services, Tests)
|
||||
- Tests discovered: 4
|
||||
- Passed: 4 / 4
|
||||
- Total time: 2.35s
|
||||
|
||||
## Verdict Logic
|
||||
|
||||
No Critical or High findings → PASS_WITH_WARNINGS.
|
||||
Reference in New Issue
Block a user