From ce260933d9e058205e940604aa1b608e21e925a8 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 18 Apr 2018 15:43:54 +0100 Subject: [PATCH] tests: consistent play naming everywhere --- .../integration/action/low_level_execute_command.yml | 6 ++---- tests/ansible/integration/action/make_tmp_path.yml | 6 ++---- tests/ansible/integration/action/remote_file_exists.yml | 6 ++---- tests/ansible/integration/action/transfer_data.yml | 7 ++++--- tests/ansible/integration/become/sudo_flags_failure.yml | 6 ++---- tests/ansible/integration/become/sudo_nonexistent.yml | 6 ++---- tests/ansible/integration/become/sudo_nopassword.yml | 6 ++---- tests/ansible/integration/become/sudo_password.yml | 6 ++---- tests/ansible/integration/become/sudo_requiretty.yml | 6 ++---- .../integration/connection_loader/local_blemished.yml | 6 +++--- .../integration/connection_loader/paramiko_unblemished.yml | 6 +++--- .../integration/connection_loader/ssh_blemished.yml | 6 +++--- .../ansible/integration/context_service/lru_one_target.yml | 6 ++---- .../integration/playbook_semantics/become_flags.yml | 6 ++---- .../ansible/integration/playbook_semantics/delegate_to.yml | 3 ++- .../ansible/integration/playbook_semantics/environment.yml | 3 ++- .../ansible/integration/playbook_semantics/with_items.yml | 6 ++---- tests/ansible/integration/runner/async_job_timeout.yml | 4 ++-- tests/ansible/integration/runner/async_one_job.yml | 3 ++- .../integration/runner/async_two_simultaneous_jobs.yml | 4 +++- .../ansible/integration/runner/builtin_command_module.yml | 7 ++++--- .../integration/runner/custom_bash_old_style_module.yml | 7 ++++--- .../integration/runner/custom_bash_want_json_module.yml | 6 +++--- .../integration/runner/custom_binary_producing_json.yml | 6 +++--- .../integration/runner/custom_binary_producing_junk.yml | 6 +++--- .../integration/runner/custom_binary_single_null.yml | 6 +++--- .../integration/runner/custom_perl_json_args_module.yml | 6 +++--- .../integration/runner/custom_perl_want_json_module.yml | 6 +++--- .../integration/runner/custom_python_json_args_module.yml | 6 +++--- .../integration/runner/custom_python_new_style_module.yml | 6 +++--- .../integration/runner/custom_python_want_json_module.yml | 6 +++--- tests/ansible/integration/runner/forking_behaviour.yml | 5 ++--- tests/ansible/integration/runner/remote_tmp.yml | 6 +++--- 33 files changed, 86 insertions(+), 101 deletions(-) diff --git a/tests/ansible/integration/action/low_level_execute_command.yml b/tests/ansible/integration/action/low_level_execute_command.yml index 25e3c90f..d900f143 100644 --- a/tests/ansible/integration/action/low_level_execute_command.yml +++ b/tests/ansible/integration/action/low_level_execute_command.yml @@ -1,11 +1,9 @@ # Verify the behaviour of _low_level_execute_command(). -- hosts: all +- name: integration/action__low_level_execute_command.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/action__low_level_execute_command.yml - assert: - that: true # "echo -en" to test we actually hit bash shell too. - name: Run raw module without sudo diff --git a/tests/ansible/integration/action/make_tmp_path.yml b/tests/ansible/integration/action/make_tmp_path.yml index b992ae54..4384aa86 100644 --- a/tests/ansible/integration/action/make_tmp_path.yml +++ b/tests/ansible/integration/action/make_tmp_path.yml @@ -1,11 +1,9 @@ -- hosts: all +- name: integration/action/make_tmp_path.yml + hosts: all any_errors_fatal: true gather_facts: true tasks: - - name: integration/action/make_tmp_path.yml - assert: - that: true - action_passthrough: method: _make_tmp_path diff --git a/tests/ansible/integration/action/remote_file_exists.yml b/tests/ansible/integration/action/remote_file_exists.yml index a4d2459f..bfda9656 100644 --- a/tests/ansible/integration/action/remote_file_exists.yml +++ b/tests/ansible/integration/action/remote_file_exists.yml @@ -1,10 +1,8 @@ -- hosts: all +- name: integration/action/remote_file_exists.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/action/remote_file_exists.yml - assert: - that: true - file: path: /tmp/does-not-exist diff --git a/tests/ansible/integration/action/transfer_data.yml b/tests/ansible/integration/action/transfer_data.yml index ad4ffa56..8f7381e3 100644 --- a/tests/ansible/integration/action/transfer_data.yml +++ b/tests/ansible/integration/action/transfer_data.yml @@ -1,9 +1,10 @@ -- hosts: all +- name: integration/action/transfer_data.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/action/transfer_data.yml - file: + + - file: path: /tmp/transfer-data state: absent diff --git a/tests/ansible/integration/become/sudo_flags_failure.yml b/tests/ansible/integration/become/sudo_flags_failure.yml index 0392e728..0ced9ddb 100644 --- a/tests/ansible/integration/become/sudo_flags_failure.yml +++ b/tests/ansible/integration/become/sudo_flags_failure.yml @@ -1,9 +1,7 @@ -- hosts: all +- name: integration/become/sudo_flags_failure.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/become/sudo_flags_failure.yml - assert: - that: true - name: Verify behaviour for bad sudo flags. shell: whoami diff --git a/tests/ansible/integration/become/sudo_nonexistent.yml b/tests/ansible/integration/become/sudo_nonexistent.yml index affcebfe..25d2dc47 100644 --- a/tests/ansible/integration/become/sudo_nonexistent.yml +++ b/tests/ansible/integration/become/sudo_nonexistent.yml @@ -1,9 +1,7 @@ -- hosts: all +- name: integration/become/sudo_nonexistent.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/become/sudo_nonexistent.yml - assert: - that: true - name: Verify behaviour for non-existent accounts. shell: whoami diff --git a/tests/ansible/integration/become/sudo_nopassword.yml b/tests/ansible/integration/become/sudo_nopassword.yml index 5aa345d0..1d50715c 100644 --- a/tests/ansible/integration/become/sudo_nopassword.yml +++ b/tests/ansible/integration/become/sudo_nopassword.yml @@ -1,11 +1,9 @@ # Verify passwordless sudo behaviour in various cases. -- hosts: all +- name: integration/become/sudo_basic.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/become/sudo_basic.yml - assert: - that: true - name: Verify we aren't root shell: whoami diff --git a/tests/ansible/integration/become/sudo_password.yml b/tests/ansible/integration/become/sudo_password.yml index b1355233..2f6f00e6 100644 --- a/tests/ansible/integration/become/sudo_password.yml +++ b/tests/ansible/integration/become/sudo_password.yml @@ -1,11 +1,9 @@ # Verify passwordful sudo behaviour -- hosts: all +- name: integration/become/sudo_password.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/become/sudo_password.yml - assert: - that: true - name: Ensure sudo password absent but required. shell: whoami diff --git a/tests/ansible/integration/become/sudo_requiretty.yml b/tests/ansible/integration/become/sudo_requiretty.yml index 3073241a..a31d5712 100644 --- a/tests/ansible/integration/become/sudo_requiretty.yml +++ b/tests/ansible/integration/become/sudo_requiretty.yml @@ -1,11 +1,9 @@ # Verify requiretty support -- hosts: all +- name: integration/become/sudo_requiretty.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/become/sudo_requiretty.yml - assert: - that: true - name: Verify we can login to a non-passworded requiretty account shell: whoami diff --git a/tests/ansible/integration/connection_loader/local_blemished.yml b/tests/ansible/integration/connection_loader/local_blemished.yml index bb53cc48..72e28ec2 100644 --- a/tests/ansible/integration/connection_loader/local_blemished.yml +++ b/tests/ansible/integration/connection_loader/local_blemished.yml @@ -1,10 +1,10 @@ # Ensure 'local' connections are grabbed. -- hosts: all +- name: integration/connection_loader__local_blemished.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/connection_loader__local_blemished.yml - determine_strategy: + - determine_strategy: - custom_python_detect_environment: connection: local diff --git a/tests/ansible/integration/connection_loader/paramiko_unblemished.yml b/tests/ansible/integration/connection_loader/paramiko_unblemished.yml index 4959b672..c29c25d2 100644 --- a/tests/ansible/integration/connection_loader/paramiko_unblemished.yml +++ b/tests/ansible/integration/connection_loader/paramiko_unblemished.yml @@ -1,10 +1,10 @@ # Ensure paramiko connections aren't grabbed. -- hosts: all +- name: integration/connection_loader__paramiko_unblemished.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/connection_loader__paramiko_unblemished.yml - custom_python_detect_environment: + - custom_python_detect_environment: connection: paramiko register: out diff --git a/tests/ansible/integration/connection_loader/ssh_blemished.yml b/tests/ansible/integration/connection_loader/ssh_blemished.yml index e39a3469..4f47a72f 100644 --- a/tests/ansible/integration/connection_loader/ssh_blemished.yml +++ b/tests/ansible/integration/connection_loader/ssh_blemished.yml @@ -1,10 +1,10 @@ # Ensure 'ssh' connections are grabbed. -- hosts: all +- name: integration/connection_loader__ssh_blemished.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/connection_loader__ssh_blemished.yml - determine_strategy: + - determine_strategy: - custom_python_detect_environment: connection: ssh diff --git a/tests/ansible/integration/context_service/lru_one_target.yml b/tests/ansible/integration/context_service/lru_one_target.yml index 3abd7b48..54264598 100644 --- a/tests/ansible/integration/context_service/lru_one_target.yml +++ b/tests/ansible/integration/context_service/lru_one_target.yml @@ -1,15 +1,13 @@ # Verify a maximum number of contexts are possible on one machine. -- hosts: all +- name: integration/context_service/lru_one_target.yml + hosts: all any_errors_fatal: true vars: max_interps: "{{lookup('env', 'MITOGEN_MAX_INTERPRETERS')}}" ubound: "{{max_interps|int + 1}}" tasks: - - name: integration/context_service/lru_one_target.yml - assert: - that: true - name: Reset all connections mitogen_shutdown_all: diff --git a/tests/ansible/integration/playbook_semantics/become_flags.yml b/tests/ansible/integration/playbook_semantics/become_flags.yml index 5922b062..1f1cb15c 100644 --- a/tests/ansible/integration/playbook_semantics/become_flags.yml +++ b/tests/ansible/integration/playbook_semantics/become_flags.yml @@ -2,12 +2,10 @@ # Test sudo_flags respects -E. # -- hosts: all +- name: integration/playbook_semantics/become_flags.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/playbook_semantics/become_flags.yml - assert: - that: true - name: "without -E" become: true diff --git a/tests/ansible/integration/playbook_semantics/delegate_to.yml b/tests/ansible/integration/playbook_semantics/delegate_to.yml index beb8bdc3..16c4b5a0 100644 --- a/tests/ansible/integration/playbook_semantics/delegate_to.yml +++ b/tests/ansible/integration/playbook_semantics/delegate_to.yml @@ -1,4 +1,5 @@ -- hosts: all +- name: integration/playbook_semantics/delegate_to.yml + hosts: all any_errors_fatal: true tasks: # diff --git a/tests/ansible/integration/playbook_semantics/environment.yml b/tests/ansible/integration/playbook_semantics/environment.yml index 8d956d49..47437d9b 100644 --- a/tests/ansible/integration/playbook_semantics/environment.yml +++ b/tests/ansible/integration/playbook_semantics/environment.yml @@ -1,6 +1,7 @@ # Ensure environment: is preserved during call. -- hosts: all +- name: integration/playbook_semantics/environment.yml + hosts: all any_errors_fatal: true tasks: - shell: echo $SOME_ENV diff --git a/tests/ansible/integration/playbook_semantics/with_items.yml b/tests/ansible/integration/playbook_semantics/with_items.yml index 35c4b3c5..876f7e03 100644 --- a/tests/ansible/integration/playbook_semantics/with_items.yml +++ b/tests/ansible/integration/playbook_semantics/with_items.yml @@ -1,12 +1,10 @@ # Verify with_items that modifies the execution environment still executes in # the correct context. -- hosts: all +- name: integration/playbook_semantics/with_items.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/playbook_semantics/with_items.yml - assert: - that: true - name: Spin up a few interpreters shell: whoami diff --git a/tests/ansible/integration/runner/async_job_timeout.yml b/tests/ansible/integration/runner/async_job_timeout.yml index 47857733..868b676d 100644 --- a/tests/ansible/integration/runner/async_job_timeout.yml +++ b/tests/ansible/integration/runner/async_job_timeout.yml @@ -1,7 +1,7 @@ # Verify 'async: ' functions as desired. - -- hosts: all +- name: integration/runner/async_job_timeout.yml + hosts: all any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/runner/async_one_job.yml b/tests/ansible/integration/runner/async_one_job.yml index b6156cca..6933f82b 100644 --- a/tests/ansible/integration/runner/async_one_job.yml +++ b/tests/ansible/integration/runner/async_one_job.yml @@ -1,7 +1,8 @@ # Verify behaviour of a single asynchronous task, and presence of all output # fields. -- hosts: all +- name: integration/runner/async_one_job.yml + hosts: all any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/runner/async_two_simultaneous_jobs.yml b/tests/ansible/integration/runner/async_two_simultaneous_jobs.yml index 4bf244d7..679608c5 100644 --- a/tests/ansible/integration/runner/async_two_simultaneous_jobs.yml +++ b/tests/ansible/integration/runner/async_two_simultaneous_jobs.yml @@ -1,4 +1,6 @@ -- hosts: all + +- name: integration/runner/async_two_simultaneous_jobs.yml + hosts: all any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/runner/builtin_command_module.yml b/tests/ansible/integration/runner/builtin_command_module.yml index ca94a604..8cfcc25c 100644 --- a/tests/ansible/integration/runner/builtin_command_module.yml +++ b/tests/ansible/integration/runner/builtin_command_module.yml @@ -1,9 +1,10 @@ -- hosts: all + +- name: integration/runner__builtin_command_module.yml + hosts: all any_errors_fatal: true gather_facts: true tasks: - - name: integration/runner__builtin_command_module.yml - command: hostname + - command: hostname with_sequence: start=1 end={{end|default(1)}} register: out diff --git a/tests/ansible/integration/runner/custom_bash_old_style_module.yml b/tests/ansible/integration/runner/custom_bash_old_style_module.yml index 3aa9fe52..030049ca 100644 --- a/tests/ansible/integration/runner/custom_bash_old_style_module.yml +++ b/tests/ansible/integration/runner/custom_bash_old_style_module.yml @@ -1,8 +1,9 @@ -- hosts: all +- name: integration/runner__custom_bash_old_style_module.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/runner__custom_bash_old_style_module.yml - custom_bash_old_style_module: + + - custom_bash_old_style_module: foo: true with_sequence: start=1 end={{end|default(1)}} register: out diff --git a/tests/ansible/integration/runner/custom_bash_want_json_module.yml b/tests/ansible/integration/runner/custom_bash_want_json_module.yml index 85e83e3e..4700aac5 100644 --- a/tests/ansible/integration/runner/custom_bash_want_json_module.yml +++ b/tests/ansible/integration/runner/custom_bash_want_json_module.yml @@ -1,8 +1,8 @@ -- hosts: all +- name: integration/runner__custom_bash_want_json_module.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/runner__custom_bash_want_json_module.yml - custom_bash_want_json_module: + - custom_bash_want_json_module: foo: true with_sequence: start=1 end={{end|default(1)}} register: out diff --git a/tests/ansible/integration/runner/custom_binary_producing_json.yml b/tests/ansible/integration/runner/custom_binary_producing_json.yml index 559d89b1..951a203b 100644 --- a/tests/ansible/integration/runner/custom_binary_producing_json.yml +++ b/tests/ansible/integration/runner/custom_binary_producing_json.yml @@ -1,8 +1,8 @@ -- hosts: all +- name: integration/runner__custom_binary_producing_json.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/runner__custom_binary_producing_json.yml - custom_binary_producing_json: + - custom_binary_producing_json: foo: true with_sequence: start=1 end={{end|default(1)}} register: out diff --git a/tests/ansible/integration/runner/custom_binary_producing_junk.yml b/tests/ansible/integration/runner/custom_binary_producing_junk.yml index 7bb83de2..1d526947 100644 --- a/tests/ansible/integration/runner/custom_binary_producing_junk.yml +++ b/tests/ansible/integration/runner/custom_binary_producing_junk.yml @@ -1,7 +1,7 @@ -- hosts: all +- name: integration/runner__custom_binary_producing_junk.yml + hosts: all tasks: - - name: integration/runner__custom_binary_producing_junk.yml - custom_binary_producing_junk: + - custom_binary_producing_junk: foo: true with_sequence: start=1 end={{end|default(1)}} ignore_errors: true diff --git a/tests/ansible/integration/runner/custom_binary_single_null.yml b/tests/ansible/integration/runner/custom_binary_single_null.yml index 6cce33d2..fa5a86ca 100644 --- a/tests/ansible/integration/runner/custom_binary_single_null.yml +++ b/tests/ansible/integration/runner/custom_binary_single_null.yml @@ -1,7 +1,7 @@ -- hosts: all +- name: integration/runner__custom_binary_single_null.yml + hosts: all tasks: - - name: integration/runner__custom_binary_single_null.yml - custom_binary_single_null: + - custom_binary_single_null: foo: true with_sequence: start=1 end={{end|default(1)}} ignore_errors: true diff --git a/tests/ansible/integration/runner/custom_perl_json_args_module.yml b/tests/ansible/integration/runner/custom_perl_json_args_module.yml index 1777798a..7606ef3d 100644 --- a/tests/ansible/integration/runner/custom_perl_json_args_module.yml +++ b/tests/ansible/integration/runner/custom_perl_json_args_module.yml @@ -1,8 +1,8 @@ -- hosts: all +- name: integration/runner__custom_perl_json_args_module.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/runner__custom_perl_json_args_module.yml - custom_perl_json_args_module: + - custom_perl_json_args_module: foo: true with_sequence: start=1 end={{end|default(1)}} register: out diff --git a/tests/ansible/integration/runner/custom_perl_want_json_module.yml b/tests/ansible/integration/runner/custom_perl_want_json_module.yml index dfe0894c..7bc4e75f 100644 --- a/tests/ansible/integration/runner/custom_perl_want_json_module.yml +++ b/tests/ansible/integration/runner/custom_perl_want_json_module.yml @@ -1,8 +1,8 @@ -- hosts: all +- name: integration/runner__custom_perl_want_json_module.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/runner__custom_perl_want_json_module.yml - custom_perl_want_json_module: + - custom_perl_want_json_module: foo: true with_sequence: start=1 end={{end|default(1)}} register: out diff --git a/tests/ansible/integration/runner/custom_python_json_args_module.yml b/tests/ansible/integration/runner/custom_python_json_args_module.yml index 027280df..b72de0a2 100644 --- a/tests/ansible/integration/runner/custom_python_json_args_module.yml +++ b/tests/ansible/integration/runner/custom_python_json_args_module.yml @@ -1,8 +1,8 @@ -- hosts: all +- name: integration/runner__custom_python_json_args_module.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/runner__custom_python_json_args_module.yml - custom_python_json_args_module: + - custom_python_json_args_module: foo: true with_sequence: start=1 end={{end|default(1)}} register: out diff --git a/tests/ansible/integration/runner/custom_python_new_style_module.yml b/tests/ansible/integration/runner/custom_python_new_style_module.yml index fce315ea..47b8ec36 100644 --- a/tests/ansible/integration/runner/custom_python_new_style_module.yml +++ b/tests/ansible/integration/runner/custom_python_new_style_module.yml @@ -1,8 +1,8 @@ -- hosts: all +- name: integration/runner__custom_python_new_style_module.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/runner__custom_python_new_style_module.yml - custom_python_new_style_module: + - custom_python_new_style_module: foo: true with_sequence: start=1 end={{end|default(1)}} register: out diff --git a/tests/ansible/integration/runner/custom_python_want_json_module.yml b/tests/ansible/integration/runner/custom_python_want_json_module.yml index 82dc2efd..c1009fb7 100644 --- a/tests/ansible/integration/runner/custom_python_want_json_module.yml +++ b/tests/ansible/integration/runner/custom_python_want_json_module.yml @@ -1,8 +1,8 @@ -- hosts: all +- name: integration/runner__custom_python_want_json_module.yml + hosts: all any_errors_fatal: true tasks: - - name: integration/runner__custom_python_want_json_module.yml - custom_python_want_json_module: + - custom_python_want_json_module: foo: true with_sequence: start=1 end={{end|default(1)}} register: out diff --git a/tests/ansible/integration/runner/forking_behaviour.yml b/tests/ansible/integration/runner/forking_behaviour.yml index 51318ff4..35ec3bfa 100644 --- a/tests/ansible/integration/runner/forking_behaviour.yml +++ b/tests/ansible/integration/runner/forking_behaviour.yml @@ -1,12 +1,11 @@ -- hosts: all +- name: integration/runner/forking_behaviour.yml + hosts: all any_errors_fatal: true tasks: # Verify non-async jobs run in-process. - - debug: msg={{is_mitogen}} - - name: get process ID. custom_python_detect_environment: register: sync_proc1 diff --git a/tests/ansible/integration/runner/remote_tmp.yml b/tests/ansible/integration/runner/remote_tmp.yml index dfa85ba4..19b33f0a 100644 --- a/tests/ansible/integration/runner/remote_tmp.yml +++ b/tests/ansible/integration/runner/remote_tmp.yml @@ -3,12 +3,12 @@ # when generating temporary paths created by the runner.py code executing # remotely. # -- hosts: all +- name: integration/runner__remote_tmp.yml + hosts: all any_errors_fatal: true gather_facts: true tasks: - - name: integration/runner__remote_tmp.yml - bash_return_paths: + - bash_return_paths: register: output - assert: