Spring Boot Integration Testing: How to register mocked server to Discovery Testcontainer - OpenFeign & Wiremock
TL;DR:
How to mock a microservice in integration tests when using Feign and Eureka?
I am running integration tests on the Controller Layer of my Employee Service, which uses OpenFeign to create a Location via the Location Service and assign its locId to the EmployeeDTO.
Production works fine because Eureka registers both services and enables communication.
Integration tests fail because Feign cannot resolve LOCATION, leading to a 503 SERVICE_UNAVAILABLE error, even though WireMock is set up...