File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 2727import io .asyncer .r2dbc .mysql .internal .util .TestContainerExtension ;
2828import io .asyncer .r2dbc .mysql .internal .util .TestServerUtil ;
2929import io .r2dbc .spi .R2dbcPermissionDeniedException ;
30+ import io .r2dbc .spi .ValidationDepth ;
3031
3132@ ExtendWith (TestContainerExtension .class )
3233public class RsaEncryptionIntegrationTest {
@@ -43,8 +44,8 @@ void sslDisabledTest() {
4344 .database (TestServerUtil .getDatabase ())
4445 .sslMode (SslMode .DISABLED )
4546 .build ();
46-
47- assertThrows ( R2dbcPermissionDeniedException . class , () -> MySqlConnectionFactory .from (configuration ).create ().block ());
47+
48+ assertThat ( MySqlConnectionFactory .from (configuration ).create ().block (). validate ( ValidationDepth . REMOTE ). block ()). isFalse ( );
4849 }
4950
5051 @ Test
@@ -61,7 +62,7 @@ void sslDisabledInvalidRsaConfig() {
6162 .serverRSAPublicKeyFile ("/path/to/mysql/serverRSAPublicKey.pem" )
6263 .build ();
6364
64- assertThrows ( IllegalArgumentException . class , () -> MySqlConnectionFactory .from (configuration2 ).create ().block ());
65+ assertThat ( MySqlConnectionFactory .from (configuration2 ).create ().block (). validate ( ValidationDepth . REMOTE ). block ()). isFalse ( );
6566 }
6667
6768 @ Test
@@ -78,6 +79,6 @@ void sslDisabledValidRsaConfig() {
7879 .serverRSAPublicKeyFile ("/usr/local/mysql/data/public_key.pem" )
7980 .build ();
8081
81- assertThat (MySqlConnectionFactory .from (configuration3 ).create ().block ()). isExactlyInstanceOf ( MySqlSimpleConnection . class );
82+ assertThat (MySqlConnectionFactory .from (configuration3 ).create ().block (). validate ( ValidationDepth . REMOTE ). block ()). isTrue ( );
8283 }
8384}
You can’t perform that action at this time.
0 commit comments