-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow setting database name and user when using JDBC URL #594
Closed
manikmagar
wants to merge
16
commits into
testcontainers:master
from
manikmagar:feature/TC_ISSUE_566
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
63343fe
Added feature to set database name and user from JDBC URL
manikmagar 6a1726a
Updated to ignore Eclipse metadata files
manikmagar 6f151da
Mark DockerMachineClientProviderStrategy as not persistable (#593)
bsideup 6daa5b0
Add spock module
kiview 8e313f1
Remove LICENSE block from spock module README
kiview b3d290a
Fix problems with Travis gradle cache
kiview ffb84f4
Added feature to set database name and user from JDBC URL
manikmagar 4006d4f
Updated to ignore Eclipse metadata files
manikmagar c10f4b6
Allow Oracle JDBC URL to be parsed
manikmagar d807546
Allow Oracle JDBC URL to be parsed
manikmagar 1be1c16
Allow Oracle JDBC URL to be parsed
manikmagar d6dcc89
Merge branch 'feature/TC_ISSUE_566' of github.com:manikmagar/testcont…
manikmagar 5d8f12a
Codacy issue fixes
manikmagar f162081
Code formatting and javadoc addition
manikmagar 8fde60e
Incorporated Code Review Changes
manikmagar e29a339
Removed unused imports
manikmagar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,9 @@ node_modules/ | |
|
||
.gradle/ | ||
build/ | ||
|
||
# Eclipse IDE files | ||
**/.project | ||
**/.classpath | ||
**/.settings | ||
**/bin/ |
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
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
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
21 changes: 21 additions & 0 deletions
21
modules/jdbc/src/main/java/org/testcontainers/containers/JdbcDatabaseContainerProvider.java
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 |
---|---|---|
@@ -1,11 +1,32 @@ | ||
package org.testcontainers.containers; | ||
|
||
import org.testcontainers.jdbc.ConnectionUrl; | ||
|
||
/** | ||
* Base class for classes that can provide a JDBC container. | ||
*/ | ||
public abstract class JdbcDatabaseContainerProvider { | ||
|
||
/** | ||
* Tests if the specified database type is supported by this Container Provider. It should match to the base image name. | ||
* @param databaseType {@link String} | ||
* @return <code>true</code> when provider can handle this database type, else <code>false</code>. | ||
*/ | ||
public abstract boolean supports(String databaseType); | ||
|
||
/** | ||
* Instantiate a new {@link JdbcDatabaseContainer} with specified image tag. | ||
* @param tag | ||
* @return Instance of {@link JdbcDatabaseContainer} | ||
*/ | ||
public abstract JdbcDatabaseContainer newInstance(String tag); | ||
|
||
/** | ||
* Instantiate a new {@link JdbcDatabaseContainer} using information provided with {@link ConnectionUrl}. | ||
* @param url {@link ConnectionUrl} | ||
* @return Instance of {@link JdbcDatabaseContainer} | ||
*/ | ||
public JdbcDatabaseContainer newInstance(ConnectionUrl url) { | ||
return newInstance(url.getImageTag()); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the formatting in this Stream.concat... block just 'idea' being weird? doesnt seem to follow the 4 space indents everywhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is not modified and related for this PR, probably upstream has changed and so you see the difference. I would leave it as-is for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please let's see if we can tackle this without regular expressions separately. I'd be very happy if we could do that and make this code easier to read.Response to wrong comment