Skip to content

Commit

Permalink
automated commit
Browse files Browse the repository at this point in the history
Signed-off-by: Public copy <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Nov 6, 2024
1 parent 0031848 commit e9399a8
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions images/vault/tests/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,32 @@ resource "imagetest_feature" "basic" {
cmd = module.helm.install_cmd
},
{
name = "Acceptance test"
cmd = <<EOF
apk add jq
name = "Add jq"
cmd = "apk add jq"
},
{
name = "Initialize the operator"
cmd = <<EOF
kubectl wait --for=jsonpath='{.status.phase}'=Running -n vault-system --timeout=30s pod/vault-0
KEY=$(kubectl exec -n vault-system vault-0 -- vault operator init \
kubectl exec -n vault-system vault-0 -- vault operator init \
-key-shares=1 \
-key-threshold=1 \
-format=json | jq -r ".unseal_keys_b64[]")
-format=json | jq -r ".unseal_keys_b64[]" > /tmp/key
[[ -s /tmp/key ]] || exit 1
EOF
retry = { attempts = 3, delay = "3s", factor = 2 }
},
{
name = "Acceptance test"
cmd = <<EOF
KEY="$(cat /tmp/key)"
kubectl exec -n vault-system vault-0 -- vault operator unseal $KEY
kubectl wait --for=condition=ready -n vault-system --timeout=120s pod/vault-0
EOF
kubectl wait --for=condition=ready -n vault-system --timeout=60s pod/vault-0
EOF
},
]

Expand Down

0 comments on commit e9399a8

Please sign in to comment.