File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
java/io/vertx/pgclient/junit Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ public class ContainerPgRule extends ExternalResource {
36
36
37
37
private static final String connectionUri = System .getProperty ("connection.uri" );
38
38
private static final String tlsConnectionUri = System .getProperty ("tls.connection.uri" );
39
+ private static final String tlsForceConnectionUri = System .getProperty ("tls.force.connection.uri" );
39
40
40
41
private ServerContainer <?> server ;
41
42
private PgConnectOptions options ;
@@ -95,7 +96,7 @@ private void initServer(String version) throws Exception {
95
96
}
96
97
97
98
public static boolean isTestingWithExternalDatabase () {
98
- return isSystemPropertyValid (connectionUri ) || isSystemPropertyValid (tlsConnectionUri );
99
+ return isSystemPropertyValid (connectionUri ) || isSystemPropertyValid (tlsConnectionUri ) || isSystemPropertyValid ( tlsForceConnectionUri ) ;
99
100
}
100
101
101
102
private static boolean isSystemPropertyValid (String systemProperty ) {
@@ -144,7 +145,11 @@ protected void before() throws Throwable {
144
145
if (isTestingWithExternalDatabase ()) {
145
146
146
147
if (ssl ) {
147
- options = PgConnectOptions .fromUri (tlsConnectionUri );
148
+ if (forceSsl ) {
149
+ options = PgConnectOptions .fromUri (tlsForceConnectionUri );
150
+ } else {
151
+ options = PgConnectOptions .fromUri (tlsConnectionUri );
152
+ }
148
153
}
149
154
else {
150
155
options = PgConnectOptions .fromUri (connectionUri );
Original file line number Diff line number Diff line change @@ -125,4 +125,4 @@ local replication all trust
125
125
host replication all 127.0.0.1/32 trust
126
126
host replication all ::1/128 trust
127
127
128
- hostssl all all all scram-sha-256
128
+ hostssl all all all md5
You can’t perform that action at this time.
0 commit comments