Skip to content

Commit

Permalink
Deprecate withSecretInVault (#7576)
Browse files Browse the repository at this point in the history
Use `withInitCommand`
  • Loading branch information
eddumelendez authored Sep 25, 2023
1 parent e84ef48 commit 5d0631f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ public SELF withLogLevel(VaultLogLevel level) {
* @param firstSecret first secret to add to specifed path
* @param remainingSecrets var args list of secrets to add to specified path
* @return this
* @deprecated use {@link #withInitCommand(String...)} instead
*/
@Deprecated
public SELF withSecretInVault(String path, String firstSecret, String... remainingSecrets) {
List<String> list = new ArrayList<>();
list.add(firstSecret);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,12 @@ public class VaultContainerTest {
// vaultContainer {
public static VaultContainer<?> vaultContainer = new VaultContainer<>("hashicorp/vault:1.13")
.withVaultToken(VAULT_TOKEN)
.withSecretInVault("secret/testing1", "top_secret=password123")
.withSecretInVault(
"secret/testing2",
"secret_one=password1",
"secret_two=password2",
"secret_three=password3",
"secret_three=password3",
"secret_four=password4"
)
.withInitCommand("secrets enable transit", "write -f transit/keys/my-key");
.withInitCommand(
"secrets enable transit",
"write -f transit/keys/my-key",
"kv put secret/testing1 top_secret=password123",
"kv put secret/testing2 secret_one=password1 secret_two=password2 secret_three=password3 secret_three=password3 secret_four=password4"
);

// }

Expand Down

0 comments on commit 5d0631f

Please sign in to comment.