Issue
I am using profiles("test") in my test class but then also while running spring boot test cases it uses my yaml from src/main/resources instead from test/resources/application-test.yaml.
I used @ActiveProfiles annotation and I expect to pick the data from test folder yaml file.
Solution
src/test/
main/
resources
is "weird"!
To fix the issue move resources
(and java
) folder to src/test/
, to conform with "maven project structure".
Answered By - xerx593
Answer Checked By - Katrina (JavaFixing Volunteer)