Skip to content

Latest commit

 

History

History
51 lines (42 loc) · 1.65 KB

File metadata and controls

51 lines (42 loc) · 1.65 KB

embedded-influxdb

Maven dependency

pom.xml
<dependency>
    <groupId>com.playtika.testcontainers</groupId>
    <artifactId>embedded-influxdb</artifactId>
    <scope>test</scope>
</dependency>

Consumes (via bootstrap.properties)

  • embedded.influxdb.enabled (true|false, default is true)

  • embedded.influxdb.reuseContainer (true|false, default is false)

  • embedded.influxdb.dockerImage (default is 'influxdb:2.0-alpine')

  • embedded.influxdb.admin-user (default is 'admin')

  • embedded.influxdb.admin-password (default is 'admin')

  • embedded.influxdb.user (default is 'user')

  • embedded.influxdb.password (default is 'password')

  • embedded.influxdb.enable-http-auth (true|false, default is true)

  • embedded.influxdb.host (default is 'localhost')

  • embedded.influxdb.port (int, default is '8086')

  • embedded.influxdb.database (default is 'db')

Produces

  • embedded.influxdb.database

  • embedded.influxdb.host

  • embedded.influxdb.password

  • embedded.influxdb.port (mapped HTTP port)

  • embedded.influxdb.user

Example

There is currently no starter library for using InfluxDB server version 1.x because it uses basic HTTP protocol to communicate. You can anyway create your own properties using those values for example in your test application.yaml:

/src/test/resources/application.yaml
influxdb:
  url: http://${embedded.influxdb.host}:${embedded.influxdb.port}
  user: ${embedded.influxdb.user}
  password: ${embedded.influxdb.password}
  database: ${embedded.influxdb.database}