Adds boot 3.1 support in SpringBootDependencyTests

This commit is contained in:
spencergibb
2023-02-08 13:49:19 -05:00
parent a2cc42614c
commit ce030c0f12

View File

@@ -175,8 +175,20 @@ public class SpringBootDependencyTests {
@Test
public void should_match_against_current_manifest() {
verifyCurrentVersionFromManifest("3.0");
verifyCurrentVersionFromManifest("3.0.x");
try {
verifyCurrentVersionFromManifest("3.0");
verifyCurrentVersionFromManifest("3.0.x");
}
catch (AssertionError e) {
if (e.getMessage() != null && e.getMessage().contains("3.1.")) {
// we're likely running a boot 3.1 compatibility test, try 3.1
verifyCurrentVersionFromManifest("3.1");
verifyCurrentVersionFromManifest("3.1.x");
}
else {
throw e;
}
}
}
private void verifyCurrentVersionFromManifest(String version) {