I'm setting up end-to-end testing within dagger, and it would be best (IMO) to have auth in the mix. We use AWS Cognito Oauth. A minimal look at the stack:
- Traefik
- Frontend
- Backend
In my daggerend_to_endfunction I initialize my stack and bind it to the test container.
I'm confident in the stack, when I run it outright as a service I'm able to do auth and the whole thing works against localhost. However, I've hit a snag when running the end-to-end tests, namely the callback URL for testing Oauth must be of the form http://localhost/... (else https is required).
I've tried binding traefik to the test container assigning the alias localhost: test_container = test_container.with_service_binding("localhost", traefik_service). However, whenever tests try to touch that url (http://localhost/mypath/) it results in a net::ERR_CONNECTION_REFUSED.
Is there a "dagger" way to test with oauth in the loop using localhost as the callback URL?