Skip to content

Commit 21029e0

Browse files
committed
add getVaultConfig
1 parent 914cdf6 commit 21029e0

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/test-integration/java/com/bettercloud/vault/util/VaultContainer.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,22 @@ public Vault getVault() throws VaultException {
226226
return getVault(config, MAX_RETRIES, RETRY_MILLIS);
227227
}
228228

229+
/**
230+
* Constructs a VaultConfig that can be used to congiure your own tests
231+
*
232+
* @return
233+
* @throws VaultException
234+
*/
235+
236+
public VaultConfig getVaultConfig() throws VaultException {
237+
return new VaultConfig()
238+
.address(getAddress())
239+
.openTimeout(5)
240+
.readTimeout(30)
241+
.sslConfig(new SslConfig().pemFile(new File(CERT_PEMFILE)).build())
242+
.build();
243+
}
244+
229245
/**
230246
* Constructs an instance of the Vault driver with sensible defaults, configured to use the supplied token
231247
* for authentication.

0 commit comments

Comments
 (0)