Merge pull request #50735 from mattclay/callback-inv
Move callback_default test inventory into test.
This commit is contained in:
parent
39824f50b1
commit
6179f2f51c
9 changed files with 13 additions and 10 deletions
|
@ -75,6 +75,3 @@ localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
|||
|
||||
[azure]
|
||||
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
|
||||
[nonexistent]
|
||||
testhost5 ansible_host=169.254.199.200
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
shippable/posix/group3
|
||||
needs/ssh
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
+ ansible-playbook -i ../../inventory test.yml
|
||||
+ ansible-playbook -i inventory test.yml
|
||||
++ set +x
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
+ ansible-playbook -i ../../inventory test.yml
|
||||
+ ansible-playbook -i inventory test.yml
|
||||
++ set +x
|
||||
fatal: [testhost]: FAILED! => {"changed": false, "msg": "no reason"}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
+ ansible-playbook -i ../../inventory test.yml
|
||||
+ ansible-playbook -i inventory test.yml
|
||||
++ set +x
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
+ ansible-playbook -i ../../inventory test.yml
|
||||
+ ansible-playbook -i inventory test.yml
|
||||
++ set +x
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
+ ansible-playbook -i ../../inventory test.yml
|
||||
+ ansible-playbook -i inventory test.yml
|
||||
++ set +x
|
||||
|
|
5
test/integration/targets/callback_default/inventory
Normal file
5
test/integration/targets/callback_default/inventory
Normal file
|
@ -0,0 +1,5 @@
|
|||
[local]
|
||||
testhost ansible_connection=local
|
||||
|
||||
[nonexistent]
|
||||
testhost5 ansible_host=169.254.199.200
|
|
@ -18,7 +18,7 @@ run_test() {
|
|||
|
||||
# The shenanigans with redirection and 'tee' are to capture STDOUT and
|
||||
# STDERR separately while still displaying both to the console
|
||||
{ ansible-playbook -i ../../inventory test.yml \
|
||||
{ ansible-playbook -i inventory test.yml \
|
||||
> >(set +x; tee "${OUTFILE}.${testname}.stdout"); } \
|
||||
2> >(set +x; tee "${OUTFILE}.${testname}.stderr" >&2)
|
||||
diff -u "${ORIGFILE}.${testname}.stdout" "${OUTFILE}.${testname}.stdout" || diff_failure
|
||||
|
@ -122,7 +122,7 @@ export ANSIBLE_DISPLAY_FAILED_STDERR=1
|
|||
|
||||
# Check if UNREACHBLE is available in stderr
|
||||
set +e
|
||||
ansible-playbook -i ../../inventory test_2.yml > >(set +x; tee "${BASEFILE}.unreachable.stdout";) 2> >(set +x; tee "${BASEFILE}.unreachable.stderr" >&2) || true
|
||||
ansible-playbook -i inventory test_2.yml > >(set +x; tee "${BASEFILE}.unreachable.stdout";) 2> >(set +x; tee "${BASEFILE}.unreachable.stderr" >&2) || true
|
||||
set -e
|
||||
if test "$(grep -c 'UNREACHABLE' "${BASEFILE}.unreachable.stderr")" -ne 1; then
|
||||
echo "Test failed"
|
||||
|
|
Loading…
Reference in a new issue