In my springboot application i use this aws paramstore and mentoned them in the application.properties file. similarly for unit testing, that is especially for integration testing that is for controller class alone. i got the below errors. how to solve them or is it possible to disable the aws param in my unitesting alone? if yes how to do that?
AsymmetricKeyOperationControllerTest > testRsaWithExpiredToken() FAILED
java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:180
Caused by: org.springframework.boot.context.config.ConfigDataResourceNotFoundException at ConfigDataResourceNotFoundException.java:97
Caused by: io.awspring.cloud.autoconfigure.config.parameterstore.ParameterStorePropertySources$AwsParameterPropertySourceNotFoundException at ParameterStorePropertySources.java:53
Caused by: software.amazon.awssdk.services.ssm.model.SsmException at CombinedResponseHandler.java:125
id 'org.springframework.boot' version '3.2.5'
id 'io.spring.dependency-management' version '1.1.4'
java {
- sourceCompatibility = '21'
}
i tried to solve them by adding
> Disable AWS Parameter Store for tests
> spring.config.import=optional:aws-parameterstore:/disabled
in the test/resources/application-test.properties file. this didnt help
ayato is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.