launcher/image/test/scripts/test_launchpolicy_health_monitoring.sh
raw| 1 | #!/bin/bash |
| 2 | set -euo pipefail |
| 3 | source util/read_serial.sh |
| 4 | |
| 5 | # Allow VM some time to boot and write to serial console. |
| 6 | sleep 120 |
| 7 | |
| 8 | SERIAL_OUTPUT=$(read_serial $1 $2) |
| 9 | if echo $SERIAL_OUTPUT | grep -q "$3" |
| 10 | then |
| 11 | echo "- Health monitoring launch policy verified" |
| 12 | else |
| 13 | echo "FAILED: Health monitoring launch policy verification" |
| 14 | echo 'TEST FAILED' > /workspace/status.txt |
| 15 | echo $SERIAL_OUTPUT |
| 16 | fi |