Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.25 KB

README.md

File metadata and controls

53 lines (35 loc) · 1.25 KB

testcontainers-warp10

This implements a Java testcontainer for the Warp10 Geo Time Series db.

What dependency to add

Add the following to your project:

pom.xml

<dependency>
  <groupId>com.clever-cloud</groupId>
  <artifactId>testcontainers-warp10</artifactId>
  <version>1.0.7</version>
</dependency>

build.gradle

implementation 'com.clever-cloud:testcontainers-warp10:1.0.7'

build.sbt

libraryDependencies += "com.clever-cloud" % "testcontainers-warp10" % "1.0.7"

Usage example

import com.clevercloud.testcontainers.warp10.Warp10Container;

try (Warp10Container container = new Warp10Container(WARP10_VERSION)) {
  // Start the container. This step might take some time...
  container.start();

  // Do whatever you want with the http client ...
  final String query = "['" + container.getReadToken() + "' 'item.temperature' { 'city' 'nantes' } '2022-01-01' TOTIMESTAMP '2022-11-06' TOTIMESTAMP ] FETCH"

  final HttpClient client = /* Create HTTP Client with host container.getHTTPHostAddress() */

  Response response = client.request("POST", "/api/v0");

  ⋯
}

(Disclaimer: this code will not compile. It's just so you get an idea!)