mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
More test fixes for split controller/remote tests.
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
setup/always/setup_pexpect
|
||||
needs/target/setup_pexpect
|
||||
shippable/posix/group3
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- name: Test pause module in default state
|
||||
hosts: testhost
|
||||
hosts: localhost
|
||||
become: no
|
||||
gather_facts: no
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- name: Test pause module with custom prompt
|
||||
hosts: testhost
|
||||
hosts: localhost
|
||||
become: no
|
||||
gather_facts: no
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- name: Test pause module with pause
|
||||
hosts: testhost
|
||||
hosts: localhost
|
||||
become: no
|
||||
gather_facts: no
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- name: Test pause module with pause and custom prompt
|
||||
hosts: testhost
|
||||
hosts: localhost
|
||||
become: no
|
||||
gather_facts: no
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- name: Test pause module echo output
|
||||
hosts: testhost
|
||||
hosts: localhost
|
||||
become: no
|
||||
gather_facts: no
|
||||
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
|
||||
set -eux
|
||||
|
||||
ANSIBLE_ROLES_PATH=../ ansible-playbook setup.yml
|
||||
|
||||
# Test pause module when no tty and non-interactive. This is to prevent playbooks
|
||||
# from hanging in cron and Tower jobs.
|
||||
/usr/bin/env bash << EOF
|
||||
ansible-playbook test-pause-no-tty.yml -i ../../inventory 2>&1 | \
|
||||
ansible-playbook test-pause-no-tty.yml 2>&1 | \
|
||||
grep '\[WARNING\]: Not waiting for response to prompt as stdin is not interactive' && {
|
||||
echo 'Successfully skipped pause in no TTY mode' >&2
|
||||
exit 0
|
||||
@@ -17,12 +19,12 @@ EOF
|
||||
|
||||
# Test redirecting stdout
|
||||
# Issue #41717
|
||||
ansible-playbook pause-3.yml -i ../../inventory > /dev/null \
|
||||
ansible-playbook pause-3.yml > /dev/null \
|
||||
&& echo "Successfully redirected stdout" \
|
||||
|| echo "Failure when attempting to redirect stdout"
|
||||
|
||||
# Test pause with seconds and minutes specified
|
||||
ansible-playbook test-pause.yml -i ../../inventory "$@"
|
||||
ansible-playbook test-pause.yml "$@"
|
||||
|
||||
# Interactively test pause
|
||||
python test-pause.py -i ../../inventory "$@"
|
||||
python test-pause.py "$@"
|
||||
|
||||
4
test/integration/targets/pause/setup.yml
Normal file
4
test/integration/targets/pause/setup.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- hosts: localhost
|
||||
gather_facts: no
|
||||
roles:
|
||||
- setup_pexpect
|
||||
@@ -1,5 +1,5 @@
|
||||
- name: Test pause
|
||||
hosts: testhost
|
||||
hosts: localhost
|
||||
gather_facts: no
|
||||
become: no
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- name: Test pause
|
||||
hosts: testhost
|
||||
hosts: localhost
|
||||
gather_facts: no
|
||||
become: no
|
||||
|
||||
|
||||
Reference in New Issue
Block a user