Tweak block integration tests to also test the free strategy
This commit is contained in:
parent
5466510edb
commit
8039ceee0f
2 changed files with 8 additions and 2 deletions
|
@ -130,9 +130,13 @@ test_tags:
|
||||||
blocks:
|
blocks:
|
||||||
# remove old output log
|
# remove old output log
|
||||||
rm -f block_test.out
|
rm -f block_test.out
|
||||||
# run test
|
# run the test and check to make sure the right number of completions was logged
|
||||||
ansible-playbook -vv test_blocks/main.yml | tee block_test.out
|
ansible-playbook -vv test_blocks/main.yml | tee block_test.out
|
||||||
# ensure each test ran
|
[ "$$(grep 'TEST COMPLETE' block_test.out | wc -l)" == "$$(egrep '^[0-9]+ plays in' block_test.out | cut -f1 -d' ')" ]
|
||||||
|
# cleanup the output log again, to make sure the test is clean
|
||||||
|
rm -f block_test.out
|
||||||
|
# run test with free strategy and again count the completions
|
||||||
|
ansible-playbook -vv test_blocks/main.yml -e test_strategy=free | tee block_test.out
|
||||||
[ "$$(grep 'TEST COMPLETE' block_test.out | wc -l)" == "$$(egrep '^[0-9]+ plays in' block_test.out | cut -f1 -d' ')" ]
|
[ "$$(grep 'TEST COMPLETE' block_test.out | wc -l)" == "$$(egrep '^[0-9]+ plays in' block_test.out | cut -f1 -d' ')" ]
|
||||||
|
|
||||||
cloud: amazon rackspace azure
|
cloud: amazon rackspace azure
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
- name: simple block test
|
- name: simple block test
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
|
strategy: "{{test_strategy|default('linear')}}"
|
||||||
vars:
|
vars:
|
||||||
block_tasks_run: false
|
block_tasks_run: false
|
||||||
block_rescue_run: false
|
block_rescue_run: false
|
||||||
|
@ -60,6 +61,7 @@
|
||||||
- name: block with includes
|
- name: block with includes
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
|
strategy: "{{test_strategy|default('linear')}}"
|
||||||
vars:
|
vars:
|
||||||
rescue_run_after_include_fail: false
|
rescue_run_after_include_fail: false
|
||||||
always_run_after_include_fail_in_rescue: false
|
always_run_after_include_fail_in_rescue: false
|
||||||
|
|
Loading…
Reference in a new issue