feat(test): enhance test_local.sh with better cleanup
- Replace `curl` with `wget` for Vault health check. - Ensure cleanup of temporary files and directories.
This commit is contained in:
parent
fbc8e689d4
commit
c662dfbfd8
|
@ -41,6 +41,7 @@ fi
|
|||
echo "Starting Vault server in non-dev mode..."
|
||||
|
||||
# Create temporary config file
|
||||
rm -fr /tmp/vault-test/data /tmp/vault-test/config
|
||||
mkdir -p /tmp/vault-test/data /tmp/vault-test/config
|
||||
|
||||
cat > /tmp/vault-test/config/vault.hcl << EOF
|
||||
|
@ -70,7 +71,7 @@ sleep 5
|
|||
|
||||
# Check if Vault is up and running
|
||||
for i in {1..10}; do
|
||||
if curl -fs -m 1 http://127.0.0.1:8200/v1/sys/health?standbyok=true\&sealedok=true\&uninitok=true > /dev/null 2>&1; then
|
||||
if wget -q -O- --no-check-certificate http://127.0.0.1:8200/v1/sys/health?standbyok=true\\&sealedok=true\\&uninitok=true > /dev/null 2>&1; then
|
||||
echo "Vault is up and running!"
|
||||
break
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue