Summary
Currently all tests mock the database layer. Add integration tests that exercise the full Controller → Service → Repository → Database stack against the Azure Cosmos DB Linux emulator running as a Docker service container in GitHub Actions. This validates that the generated repository code actually works against a real Cosmos DB API.
Each language's CI pipeline gets a new integration-test job that starts the emulator, seeds a database/container, and runs repository-level integration tests.
Category: testing, azure
Acceptance Criteria
Implementation Notes
Cosmos DB Emulator in GHA
services:
cosmosdb:
image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
ports:
- 8081:8081
- 10250-10255:10250-10255
env:
AZURE_COSMOS_EMULATOR_PARTITION_COUNT: 1
AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE: false
Emulator connection details:
- Endpoint:
https://localhost:8081
- Account Key: Well-known emulator key (
C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==)
- SSL: Self-signed cert (tests need to disable SSL verification or trust the emulator cert)
Test Structure per Language
Each integration test should:
- Initialize the database client pointing at the emulator
- Create a test database + container in
setup/beforeAll
- Run each CRUD operation and assert results
- Clean up the database in
teardown/afterAll
Estimated CI Impact
- Adds ~2-4 minutes per language (emulator startup + test execution)
- Only runs on Ubuntu (emulator is Linux-only Docker image)
Summary
Currently all tests mock the database layer. Add integration tests that exercise the full Controller → Service → Repository → Database stack against the Azure Cosmos DB Linux emulator running as a Docker service container in GitHub Actions. This validates that the generated repository code actually works against a real Cosmos DB API.
Each language's CI pipeline gets a new
integration-testjob that starts the emulator, seeds a database/container, and runs repository-level integration tests.Category:
testing,azureAcceptance Criteria
test-integration-azurejob (runs onubuntu-latestonly)mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest) runs as a Docker service containerintegration_tests/ortests/integration/directory with tests that:test-integrationtargetAzure Function Appmatrix variantImplementation Notes
Cosmos DB Emulator in GHA
Emulator connection details:
https://localhost:8081C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==)Test Structure per Language
Each integration test should:
setup/beforeAllteardown/afterAllEstimated CI Impact