Hi,
So at my current employer there is an established pattern where the integration tests expose mock APIs that the API container will query as needed. This allow the integration tests to mock services dynamically based on the tests being ran. This means that the Integration Test would need to be exposed as a Service, but the integration test itself depends on the API.
We currently use docker-compose and since a running container can act as a service/expose ports it works fairly well.
flowchart TD
Tests[Integration Tests] --API Test call--> API
API --Mocked API A--> Tests
API --Mocked API B--> Tests
I am pretty sure it is impossible to model with the current Dagger API (a service that depends on a service), but even if it was possible we would also run into and issue where integration test container cannot be a service if we want to extract files like tests reports at the end of a run. If it was possible to extract files from a service that would also work.
So my question, is there anything in buildkit that would prevent us from:
- Having cyclical dependencies between services expose a running container.
- Extract files from a service.
Thanks,
JM