I have a SpringBootTest and I want to add a spring-profile to the existing ones for a specific tests. I tried @SpringBootTest(webEnvironment = RANDOM_PORT, properties = "spring.profiles.include=my-second-profile")
which was suggested in https://github.com/spring-projects/spring-boot/issues/7668 but this doesn't work at all. Only the profile which was included is active now. As a result my context does not start because required properties from the default active profiles are missing. Has anyone an idea how to solve this problem?
Thanks!
Aucun commentaire:
Enregistrer un commentaire