Files
troubleshoot/scripts/host-preflight-integration-test.sh
Tom Wieczorek 49fe355086 chore: Don't hardcode /bin/bash (#1011)
Bash is not always installed in /bin/bash. Mitigate that by relying on
bash being in PATH.
2023-02-10 17:25:57 +00:00

30 lines
569 B
Bash
Executable File

#!/usr/bin/env bash
function say() {
echo
echo "---------------------------------------------------------------"
echo $1
echo "---------------------------------------------------------------"
echo
}
if [ "$EUID" -ne 0 ]
then say "Use sudo to run this script"
exit
fi
for FILE in $(find ../examples/preflight/host/*.yaml)
do
if [ "${FILE}" = "../examples/preflight/host/tcp-load-balancer.yaml" ]
then say "Skipping ${FILE}"
continue
fi
say "Running Test ${FILE}"
../bin/preflight --interactive=false $FILE
done