Skip to content
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

Add InfluxDB support #686

Merged
merged 3 commits into from
May 16, 2018
Merged

Conversation

banadiga
Copy link
Contributor

@banadiga banadiga commented May 9, 2018

Add support for InfluxDB

public void getUrl() {
String actual = influxDBContainer.getUrl();

assertThat(actual, startsWith("http://localhost:"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not always true :)

@@ -9,9 +9,10 @@ dependencies {
compile 'org.spockframework:spock-core:1.0-groovy-2.4'

testCompile project(':mysql')
testCompile project(':influxdb')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think spock testing of it is needed

public class InfluxDBContainer<SELF extends InfluxDBContainer<SELF>> extends GenericContainer<SELF>
implements LinkableContainer {

public static final String VERSION = "latest";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please fix the version? We're trying to not use latest anymore to avoid unexpected test failures when new image is released (like it happened with MySQL 8 :D )


private boolean authEnabled = true;
private String admin = "admin";
private String adminPassword = UUID.randomUUID().toString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it really make sense to randomize it?

* @param hostPort a port on the docker host, which must be available
* @return a reference to this container instance
*/
public SELF withFixedExposedPort(int hostPort) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this method?


compile "org.influxdb:influxdb-java:${influxdbJavaClientVersion}"

testCompile "junit:junit:$junitVersion"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

junit should be on classpath already

dependencies {
compile project(':testcontainers')

compile "org.influxdb:influxdb-java:${influxdbJavaClientVersion}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. compileOnly, users should bring their own drivers
  2. could you please specify the version here? ext doesn't make a lot of sense unless shared between the modules (not the case)


## Dependency information

Replace `VERSION` with the [latest version available on Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.testcontainers%22).
Copy link
Member

@bsideup bsideup May 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also use the latest version badge:

[![](https://api.bintray.com/packages/testcontainers/releases/testcontainers/images/download.svg)](https://bintray.com/testcontainers/releases/testcontainers/_latestVersion)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@bsideup bsideup added this to the next milestone May 9, 2018
@bsideup bsideup self-assigned this May 14, 2018
@bsideup
Copy link
Member

bsideup commented May 14, 2018

Hi @banadiga, any progress? :)

@banadiga
Copy link
Contributor Author

Hi @bsideup all comments fixed

@bsideup
Copy link
Member

bsideup commented May 15, 2018

@banadiga cool! Almost there, just forgot to ask you to add a line to CHANGELOG.md, sorry about that :)

@banadiga
Copy link
Contributor Author

Hi @bsideup, no problem ) CHANGELOG updated

@bsideup bsideup merged commit c2e3f80 into testcontainers:master May 16, 2018
@bsideup
Copy link
Member

bsideup commented May 16, 2018

@banadiga merged, thanks! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants