Skip to content

Commit 5313bfd

Browse files
committed
Fixed integration test
Signed-off-by: S V <vats02581@gmail.com>
1 parent 6088a73 commit 5313bfd

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

r2dbc-mysql/src/test/java/io/asyncer/r2dbc/mysql/SslTunnelIntegrationTest.java

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -134,59 +134,6 @@ void sslTunnelConnectionTest() {
134134
connection.close().block();
135135
}
136136

137-
@Test
138-
void sslDisabledTest() {
139-
Assume.assumeTrue(TestServerUtil.getServerVersion().getMajor() >= 8);
140-
141-
MySqlConnectionConfiguration configuration = MySqlConnectionConfiguration.builder()
142-
.host("localhost")
143-
.port(sslTunnelServer.getLocalPort())
144-
.user(TestServerUtil.getUsername())
145-
.password(TestServerUtil.getPassword())
146-
.database(TestServerUtil.getDatabase())
147-
.createDatabaseIfNotExist(true)
148-
.sslMode(SslMode.DISABLED)
149-
.build();
150-
151-
assertThrows(R2dbcPermissionDeniedException.class, () -> MySqlConnectionFactory.from(configuration).create());
152-
}
153-
154-
@Test
155-
void sslDisabledInvalidRsaConfig() {
156-
Assume.assumeTrue(TestServerUtil.getServerVersion().getMajor() >= 8);
157-
158-
MySqlConnectionConfiguration configuration2 = MySqlConnectionConfiguration.builder()
159-
.host("localhost")
160-
.port(sslTunnelServer.getLocalPort())
161-
.user(TestServerUtil.getUsername())
162-
.password(TestServerUtil.getPassword())
163-
.database(TestServerUtil.getDatabase())
164-
.createDatabaseIfNotExist(true)
165-
.sslMode(SslMode.DISABLED)
166-
.serverRSAPublicKeyFile("/path/to/mysql/serverRSAPublicKey.pem")
167-
.build();
168-
169-
assertThrows(IllegalArgumentException.class, () -> MySqlConnectionFactory.from(configuration2).create());
170-
}
171-
172-
@Test
173-
void sslDisabledValidRsaConfig() {
174-
Assume.assumeTrue(TestServerUtil.getServerVersion().getMajor() >= 8);
175-
176-
MySqlConnectionConfiguration configuration3 = MySqlConnectionConfiguration.builder()
177-
.host("localhost")
178-
.port(sslTunnelServer.getLocalPort())
179-
.user(TestServerUtil.getUsername())
180-
.password(TestServerUtil.getPassword())
181-
.database(TestServerUtil.getDatabase())
182-
.createDatabaseIfNotExist(true)
183-
.sslMode(SslMode.DISABLED)
184-
.serverRSAPublicKeyFile("/usr/local/mysql/data/public_key.pem")
185-
.build();
186-
187-
assertThat(MySqlConnectionFactory.from(configuration3).create().block()).isExactlyInstanceOf(MySqlSimpleConnection.class);
188-
}
189-
190137
private static class SslTunnelServer {
191138

192139
private final String remoteHost;

0 commit comments

Comments
 (0)