make SSL errors more clear by showing the details of the caught exception

This commit is contained in:
Jonathan Shook
2022-03-21 17:03:19 -05:00
parent 00464dbca3
commit 5bc9457364
2 changed files with 9 additions and 9 deletions

View File

@@ -162,7 +162,7 @@ public class SSLKsFactoryTest {
NBConfiguration sslCfg = SSLKsFactory.get().getConfigModel().extractConfig(activityDef.getParams());
assertThatExceptionOfType(RuntimeException.class)
.isThrownBy(() -> SSLKsFactory.get().getContext(sslCfg))
.withMessageMatching("Unable to load the keystore. Please check.");
.withMessageMatching("Unable to load the keystore: .*");
}
@Test
@@ -192,7 +192,7 @@ public class SSLKsFactoryTest {
NBConfiguration sslCfg = SSLKsFactory.get().getConfigModel().extractConfig(activityDef.getParams());
assertThatExceptionOfType(RuntimeException.class)
.isThrownBy(() -> SSLKsFactory.get().getContext(sslCfg))
.withMessageMatching("Unable to load the truststore. Please check.");
.withMessageMatching("Unable to load the truststore: .*");
}
@Test