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
This commit is contained in:
Jorge Gallegos 2025-09-04 19:28:23 -07:00
commit 5745bdaac2
No known key found for this signature in database
8 changed files with 215 additions and 0 deletions

View file

@ -0,0 +1,25 @@
#!/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