With IntelliJ, I can specify a Spring boot profile to run when starting a service

However, if I run mvn clean install, then the tests are run with the default profile, which causes them to fail. How can I tell mvn to run the tests with a specific Spring Boot profile?
application.properteisinsrc/test/resourcesfor all tests or define them at the appropriate tests (docs.spring.io/spring-boot/docs/2.7.1/reference/htmlsingle/…)