This implements a Java testcontainer for the Warp10 Geo Time Series db.
Add the following to your project:
<dependency>
<groupId>com.clever-cloud</groupId>
<artifactId>testcontainers-warp10</artifactId>
<version>1.0.7</version>
</dependency>
implementation 'com.clever-cloud:testcontainers-warp10:1.0.7'
libraryDependencies += "com.clever-cloud" % "testcontainers-warp10" % "1.0.7"
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!)