File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
main/java/org/testcontainers/vault
test/java/org/testcontainers/vault Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,9 @@ public SELF withLogLevel(VaultLogLevel level) {
174174 * @param firstSecret first secret to add to specifed path
175175 * @param remainingSecrets var args list of secrets to add to specified path
176176 * @return this
177+ * @deprecated use {@link #withInitCommand(String...)} instead
177178 */
179+ @ Deprecated
178180 public SELF withSecretInVault (String path , String firstSecret , String ... remainingSecrets ) {
179181 List <String > list = new ArrayList <>();
180182 list .add (firstSecret );
Original file line number Diff line number Diff line change @@ -26,16 +26,12 @@ public class VaultContainerTest {
2626 // vaultContainer {
2727 public static VaultContainer <?> vaultContainer = new VaultContainer <>("hashicorp/vault:1.13" )
2828 .withVaultToken (VAULT_TOKEN )
29- .withSecretInVault ("secret/testing1" , "top_secret=password123" )
30- .withSecretInVault (
31- "secret/testing2" ,
32- "secret_one=password1" ,
33- "secret_two=password2" ,
34- "secret_three=password3" ,
35- "secret_three=password3" ,
36- "secret_four=password4"
37- )
38- .withInitCommand ("secrets enable transit" , "write -f transit/keys/my-key" );
29+ .withInitCommand (
30+ "secrets enable transit" ,
31+ "write -f transit/keys/my-key" ,
32+ "kv put secret/testing1 top_secret=password123" ,
33+ "kv put secret/testing2 secret_one=password1 secret_two=password2 secret_three=password3 secret_three=password3 secret_four=password4"
34+ );
3935
4036 // }
4137
You can’t perform that action at this time.
0 commit comments