-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add MariaDB service detection and replace MySQL JDBC prefix Update MySqlJdbcUrlCreator to add MariaDB schemes, tags and labels Update MySqlJdbcUrlCreator to override createJdbcUrl from AbstractJdbcUrlCreator Update MySqlJdbcUrlCreator to add detection of MariaDB service based on CF environment tags, labels and MariaDB uri Conditionally update the JDBC URL that was either generated or obtained from the CF Service if the current driver class name matches the MariaDB driver and any of the specific MariaDB detection cases Overload existsByLabelStartsWith method in CfService to allow checking if one of many labels matches the CF service label * Add test cases for MariaDB database CF Service * Fix Formatting * Include mariadb services with label that includes * not just starts with --------- Co-authored-by: David Duarte <[email protected]>
- Loading branch information
1 parent
424a59d
commit 7673f2f
Showing
8 changed files
with
258 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...-cfenv-jdbc/src/test/resources/io/pivotal/cfenv/jdbc/test-mariadb-info-jdbc-url-only.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "$serviceName", | ||
"credentials": { | ||
"jdbcUrl": "jdbc:mariadb://$hostname:$port/$name?user=$user&password=$password" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
java-cfenv-jdbc/src/test/resources/io/pivotal/cfenv/jdbc/test-mariadb-info-jdbc-url.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "$serviceName", | ||
"credentials": { | ||
"jdbcUrl": "jdbc:mariadb://$hostname:$port/$name?user=$user&password=$password", | ||
"uri": "mariadb://$user:$password@$hostname:$port/$name" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
java-cfenv-jdbc/src/test/resources/io/pivotal/cfenv/jdbc/test-mariadb-info-uri.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "$serviceName", | ||
"label": "cleardb", | ||
"plan": "free", | ||
"credentials": { | ||
"uri": "mariadb://$user:$password@$hostname:$port/$name" | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...v-jdbc/src/test/resources/io/pivotal/cfenv/jdbc/test-mariadb-info-with-label-no-tags.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "$serviceName", | ||
"label": "a9s-mariadb106", | ||
"tags": [], | ||
"plan": "free", | ||
"credentials": { | ||
"uri": "mysql://$user:$password@$hostname:$port/$name" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
java-cfenv-jdbc/src/test/resources/io/pivotal/cfenv/jdbc/test-mariadb-info.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "$serviceName", | ||
"label": "cleardb", | ||
"tags": [ | ||
"mariadb", | ||
"mysql" | ||
], | ||
"plan": "free", | ||
"credentials": { | ||
"uri": "mysql://$user:$password@$hostname:$port/$name" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters