mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-10-01 14:03:30 -07:00
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:
parent
0296c92c00
commit
5745bdaac2
8 changed files with 215 additions and 0 deletions
25
tests/integration/targets/connection_plugin/runme.sh
Executable file
25
tests/integration/targets/connection_plugin/runme.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue