👋 Hello, team!
My name is Kamil Rozbicki and I work for Mastercard in Dublin, Ireland.
Oleg Nenashev has pointed me to this group as I was trying to get some advise from him on a challenge I have with the Wiremock.
While trying to find a solution to a challenge I have, I stumbled upon one of the applications Maciej Walkowiak wrote:
https://github.com/maciejwalkowiak/wiremock-spring-boot
He confirmed my impression this would be strictly for @SpringBootTest and would not help with what I want to achieve.
In my team in Mastercard, we are making heavy use of various Microservice API mocks that use Wiremock under the hood. We deploy them to Pivotal Cloud Foundry, as SpringBoot apps, in order to facilitate execution of post-deployment tests on our new microservices, without the need of having their dependant services in place, in the development environment. (Of course, we later integrate these services and do test them together as well).
A while ago, it's become a requirement for us to use mutual-TLS security between our apps, based on server/client policies. This is all proprietary libraries, so won't go much into details.
Long story short: I need to make Wiremock work inside a SpringBoot application, preferably sharing same TCP port (8080). I've used this idea (1st answer):
https://stackoverflow.com/questions/58273451/run-wiremock-server-as-a-springboot-application
However, this solution requires disabling Web Application (seting it to 'none'), but this in turn disables our security libraries performing policy-based authorization. Without setting this option to 'none',
I can only make the application to run on 2 separate ports, for example: 8080 for SpringBoot and 8081 for Wiremock, or have 'port in use' exception thrown by Spring Boot on the startup, when I set bot to use same port.
Can you think of any other way to make a Wiremock instance, with all its great functionalities, work inside SpringBoot application, on same port?
Thank you again for your time.
Any help welcomed.