google.cloud/tests/integration/targets/connection_plugin/runme.sh
Jorge Gallegos 5745bdaac2
Integration test for new IAP connection plugin
1. creates instances with a custom ssh keypair
2. change the connection plugin method and perform basic checks
3. cleanup
2025-09-04 19:28:23 -07:00

25 lines
451 B
Bash
Executable file

#!/usr/bin/env bash
set -eux
# test infra
ansible-playbook playbooks/setup.yml "$@"
export ANSIBLE_INVENTORY=test.gcp_compute.yml
ansible-inventory --graph
RC=0
# we want to run teardown regardless of playbook exit status, so catch the
# exit code of ansible-playbook manually
set +e
ansible-playbook -vvvvv playbooks/test.yml "$@"
RC=$?
set -e
unset ANSIBLE_INVENTORY
# delete test infra
ansible-playbook playbooks/teardown.yml "$@"
exit $RC