what am I doing?
I have an app that I want to test across different environments - dev, staging, etc
What I do?
I am using
Try this. I learned from different places and created the following. It works for me
public class SpringActiveProfileResolver implements ActiveProfilesResolver {
@Override
public String[] resolve(final Class<?> aClass) {
final String activeProfile = System.getProperty("spring.profiles.active");
return new String[] { activeProfile == null ? "integration" : activeProfile };
}
}
and on you test class do this
@ActiveProfiles(resolver = SpringActiveProfileResolver.class)
public class IT1DataSetup {
......
}