Skip to content

Fix EncryptionIntegrationTests for changes in Boot behavior#1665

Merged
ryanjbaxter merged 1 commit intomainfrom
fix-encyrptionintegrationtests
Mar 13, 2026
Merged

Fix EncryptionIntegrationTests for changes in Boot behavior#1665
ryanjbaxter merged 1 commit intomainfrom
fix-encyrptionintegrationtests

Conversation

@ryanjbaxter
Copy link
Contributor

Due to spring-projects/spring-boot@646db44 in Spring Boot 4.0.3 and beyond the initial call to resolve may not have application-failsafe.properties loaded so EncryptionIntegrationTests.failsafeShouldHaveDelegate will fail when we assert TextEncryptorUtils.keysConfigured(keyProperties) is true. application-failsafe.properties will only be available on
subsequent calls to resolve so we return if TextEncryptorUtils.keysConfigured(keyProperties) is false. We need to get TextEncryptor from the context before we return so FailSafeTextEncryptor is created and used in subsequent calls to resolve.

Due to spring-projects/spring-boot@646db44 in Spring Boo 4.0.3 and beyond the initial call to resolve may not have application-failsafe.properties loaded so EncryptionIntegrationTests.failsafeShouldHaveDelegate will fail when we assert TextEncryptorUtils.keysConfigured(keyProperties) is true. application-failsafe.properties will only be available on
 subsequent calls to resolve so we return if TextEncryptorUtils.keysConfigured(keyProperties) is false. We need to get TextEncryptor from the context before we return so FailSafeTextEncryptor is created and used in subsequent calls to resolve.
@ryanjbaxter ryanjbaxter merged commit acfb158 into main Mar 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants