Skip to content

CleverCloud/testcontainers-warp10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!)

About

A Testcontainer implementation for Warp10

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages