File tree Expand file tree Collapse file tree 7 files changed +12
-59
lines changed
main/java/org/testcontainers/containers
java/org/testcontainers/containers
src/test/groovy/org/testcontainers/spock Expand file tree Collapse file tree 7 files changed +12
-59
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ public class SomeTest {
2222
2323Replace `VERSION ` with the [latest version available on Maven Central ](https: // search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.testcontainers%22).
2424
25+ [! [](https: // api.bintray.com/packages/testcontainers/releases/testcontainers/images/download.svg)](https://bintray.com/testcontainers/releases/testcontainers/_latestVersion)
26+
27+
2528### Maven
2629```
2730< dependency>
Original file line number Diff line number Diff line change 11description = " Testcontainers :: InfluxDB"
22
3- ext {
4- influxdbJavaClientVersion = ' 2.9'
5-
6- junitVersion = ' 4.12'
7- }
8-
93dependencies {
104 compile project(' :testcontainers' )
115
12- compile " org.influxdb:influxdb-java:${ influxdbJavaClientVersion} "
13-
14- testCompile " junit:junit:$junitVersion "
6+ compileOnly ' org.influxdb:influxdb-java:2.10'
7+ testCompile ' org.influxdb:influxdb-java:2.10'
158}
Original file line number Diff line number Diff line change 66import org .testcontainers .containers .wait .strategy .Wait ;
77import org .testcontainers .containers .wait .strategy .WaitAllStrategy ;
88
9- import java .util .UUID ;
10-
119/**
1210 * @link https://store.docker.com/images/influxdb
1311 */
1412public class InfluxDBContainer <SELF extends InfluxDBContainer <SELF >> extends GenericContainer <SELF >
1513 implements LinkableContainer {
1614
17- public static final String VERSION = "latest " ;
15+ public static final String VERSION = "1.4.3 " ;
1816 public static final Integer INFLUXDB_PORT = 8086 ;
1917
2018 private static final String IMAGE_NAME = "influxdb" ;
2119
2220 private boolean authEnabled = true ;
2321 private String admin = "admin" ;
24- private String adminPassword = UUID . randomUUID (). toString () ;
22+ private String adminPassword = "password" ;
2523
2624 private String database ;
2725 private String username = "any" ;
@@ -58,16 +56,6 @@ protected Integer getLivenessCheckPort() {
5856 return getMappedPort (INFLUXDB_PORT );
5957 }
6058
61- /**
62- * Bind a fixed port on the docker host to a container port
63- *
64- * @param hostPort a port on the docker host, which must be available
65- * @return a reference to this container instance
66- */
67- public SELF withFixedExposedPort (int hostPort ) {
68- super .addFixedExposedPort (hostPort , INFLUXDB_PORT );
69- return self ();
70- }
7159
7260 /**
7361 * Set env variable `INFLUXDB_HTTP_AUTH_ENABLED`.
Original file line number Diff line number Diff line change 66
77import static org .hamcrest .CoreMatchers .is ;
88import static org .hamcrest .CoreMatchers .notNullValue ;
9- import static org .hamcrest .CoreMatchers .startsWith ;
109import static org .junit .Assert .assertThat ;
1110
1211public class InfluxDBContainerTest {
@@ -18,7 +17,7 @@ public class InfluxDBContainerTest {
1817 public void getUrl () {
1918 String actual = influxDBContainer .getUrl ();
2019
21- assertThat (actual , startsWith ( "http://localhost:" ));
20+ assertThat (actual , notNullValue ( ));
2221 }
2322
2423 @ Test
Original file line number Diff line number Diff line change 1616 <logger name =" com.github.dockerjava" level =" WARN" />
1717 <logger name =" org.zeroturnaround.exec" level =" WARN" />
1818 <logger name =" com.zaxxer.hikari" level =" INFO" />
19- <logger name =" org.rnorth.tcpunixsocketproxy" level =" INFO" />
20- <logger name =" io.netty" level =" WARN" />
21- <logger name =" org.mongodb" level =" INFO" />
19+ <logger name =" org.rnorth.tcpunixsocketproxy" level =" INFO" />
20+ <logger name =" io.netty" level =" WARN" />
21+ <logger name =" org.mongodb" level =" INFO" />
2222 <logger name =" org.testcontainers.shaded" level =" WARN" />
2323 <logger name =" com.zaxxer.hikari" level =" INFO" />
2424</configuration >
Original file line number Diff line number Diff line change @@ -9,10 +9,9 @@ dependencies {
99 compile ' org.spockframework:spock-core:1.0-groovy-2.4'
1010
1111 testCompile project(' :mysql' )
12- testCompile project(' :influxdb' )
1312 testCompile project(' :postgresql' )
1413 testCompile ' com.zaxxer:HikariCP:2.6.1'
1514
1615 testRuntime ' org.postgresql:postgresql:42.0.0'
1716 testRuntime ' mysql:mysql-connector-java:6.0.6'
18- }
17+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments