Testcontainers module for Vault. Vault is a tool for managing secrets. More information on Vault here.
Start Vault container as a @ClassRule
:
Starting a Vault container inside_block:vaultContainer
Use CLI to read data from Vault container:
Use CLI to read data inside_block:readFirstSecretPathWithCli
Use Http API to read data from Vault container:
Use Http API to read data inside_block:readFirstSecretPathOverHttpApi
Use client library to read data from Vault container:
Use library to read data inside_block:readWithLibrary
With the increasing popularity of Vault and secret management, applications are now needing to source secrets from Vault. This can prove challenging in the development phase without a running Vault instance readily on hand. This library aims to solve your apps integration testing with Vault. You can also use it to test how your application behaves with Vault by writing different test scenarios in Junit.
Add the following dependency to your pom.xml
/build.gradle
file:
=== "Gradle"
groovy testImplementation "org.testcontainers:vault:{{latest_version}}"
=== "Maven"
xml <dependency> <groupId>org.testcontainers</groupId> <artifactId>vault</artifactId> <version>{{latest_version}}</version> <scope>test</scope> </dependency>
See LICENSE.
Copyright (c) 2017 Capital One Services, LLC and other authors.
See AUTHORS for contributors.