Skip to content

Commit

Permalink
fix(db) fixing tests
Browse files Browse the repository at this point in the history
ref: #26481
  • Loading branch information
wezell committed Oct 23, 2023
1 parent b93c105 commit 0b386b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PgNgDataSourceUrl {
private final String finalUrl;


private final String SSL_MODE = System.getenv("DOT_PUBSUB_SSL_MODE") != null ? System.getenv("DOT_PUBSUB_SSL_MODE") : "prefer";
static final String SSL_MODE = System.getenv("DOT_PUBSUB_SSL_MODE") != null ? System.getenv("DOT_PUBSUB_SSL_MODE") : "prefer";



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static void setUpBeforeClass() throws Exception {}



final String PgNgUrl = "jdbc:pgsql://dotcmsUserName:dotcmsPassword@dbServer.com/dotcms";
final String PgNgUrl = "jdbc:pgsql://dotcmsUserName:dotcmsPassword@dbServer.com/dotcms?ssl.mode=" + PgNgDataSourceUrl.SSL_MODE;



Expand Down Expand Up @@ -85,14 +85,14 @@ public void test_ssl_mode_is_added() throws MalformedURLException {

PgNgDataSourceUrl testDataSource = new PgNgDataSourceUrl(username, password, url);

assert testDataSource.getDbUrl().contains("?ssl.mode=require");
assert testDataSource.getDbUrl().contains("?ssl.mode=" + PgNgDataSourceUrl.SSL_MODE);

url = "jdbc:postgresql://dbServer.com/dotcms?test=here";


testDataSource = new PgNgDataSourceUrl(username, password, url);

assert testDataSource.getDbUrl().contains("&ssl.mode=require");
assert testDataSource.getDbUrl().contains("&ssl.mode=" + PgNgDataSourceUrl.SSL_MODE);

}
}

0 comments on commit 0b386b8

Please sign in to comment.