diff options
author | Matt Martz <matt@sivel.net> | 2017-11-27 16:58:08 -0600 |
---|---|---|
committer | ansibot <ansibot@users.noreply.github.com> | 2017-11-27 17:58:08 -0500 |
commit | 4fe08441be093a9cbe968e00606e03e33605207c (patch) | |
tree | f41c0383cdd50e08e2744468e54a7a9bb15035f9 /test/integration/targets/win_script | |
parent | fd4a6cf7ad7012a07b29096f5c70f34499af1216 (diff) | |
download | ansible-4fe08441be093a9cbe968e00606e03e33605207c.tar.gz |
Deprecate tests used as filters (#32361)
* Warn on tests used as filters
* Update docs, add aliases for tests that fit more gramatically with test syntax
* Fix rst formatting
* Add successful filter, alias of success
* Remove renamed_deprecation, it was overkill
* Make directory alias for is_dir
* Update tests to use proper jinja test syntax
* Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax
* Add conversion script, porting guide updates, and changelog updates
* Update newly added uses of tests as filters
* No underscore variable
* Convert recent tests as filter changes to win_stat
* Fix some changes related to rebasing a few integration tests
* Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name
* Add test for tests_as_filters_warning
* Update tests as filters in newly added/modified tests
* Address recent changes to several integration tests
* Address recent changes in cs_vpc
Diffstat (limited to 'test/integration/targets/win_script')
-rw-r--r-- | test/integration/targets/win_script/tasks/main.yml | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/test/integration/targets/win_script/tasks/main.yml b/test/integration/targets/win_script/tasks/main.yml index 32b637630a..a46218da5c 100644 --- a/test/integration/targets/win_script/tasks/main.yml +++ b/test/integration/targets/win_script/tasks/main.yml @@ -35,8 +35,8 @@ - "test_script_result.stdout" - "'Woohoo' in test_script_result.stdout" - "not test_script_result.stderr" - - "not test_script_result | failed" - - "test_script_result | changed" + - "test_script_result is not failed" + - "test_script_result is changed" - name: run test script that takes arguments including a unicode char script: test_script_with_args.ps1 /this /that /Ӧther @@ -51,8 +51,8 @@ - "test_script_with_args_result.stdout_lines[1] == '/that'" - "test_script_with_args_result.stdout_lines[2] == '/Ӧther'" - "not test_script_with_args_result.stderr" - - "not test_script_with_args_result | failed" - - "test_script_with_args_result | changed" + - "test_script_with_args_result is not failed" + - "test_script_with_args_result is changed" - name: run test script that takes parameters passed via splatting script: test_script_with_splatting.ps1 @{ This = 'this'; That = '{{ test_win_script_value }}'; Other = 'other'} @@ -67,8 +67,8 @@ - "test_script_with_splatting_result.stdout_lines[1] == test_win_script_value" - "test_script_with_splatting_result.stdout_lines[2] == 'other'" - "not test_script_with_splatting_result.stderr" - - "not test_script_with_splatting_result | failed" - - "test_script_with_splatting_result | changed" + - "test_script_with_splatting_result is not failed" + - "test_script_with_splatting_result is changed" - name: run test script that takes splatted parameters from a variable script: test_script_with_splatting.ps1 {{ test_win_script_splat }} @@ -83,8 +83,8 @@ - "test_script_with_splatting2_result.stdout_lines[1] == 'THAT'" - "test_script_with_splatting2_result.stdout_lines[2] == 'OTHER'" - "not test_script_with_splatting2_result.stderr" - - "not test_script_with_splatting2_result | failed" - - "test_script_with_splatting2_result | changed" + - "test_script_with_splatting2_result is not failed" + - "test_script_with_splatting2_result is changed" - name: run test script that has errors script: test_script_with_errors.ps1 @@ -97,8 +97,8 @@ - "test_script_with_errors_result.rc != 0" - "not test_script_with_errors_result.stdout" - "test_script_with_errors_result.stderr" - - "test_script_with_errors_result | failed" - - "test_script_with_errors_result | changed" + - "test_script_with_errors_result is failed" + - "test_script_with_errors_result is changed" - name: cleanup test file if it exists raw: Remove-Item "{{ test_win_script_filename }}" -Force @@ -116,8 +116,8 @@ - "test_script_creates_file_result.rc == 0" - "not test_script_creates_file_result.stdout" - "not test_script_creates_file_result.stderr" - - "not test_script_creates_file_result | failed" - - "test_script_creates_file_result | changed" + - "test_script_creates_file_result is not failed" + - "test_script_creates_file_result is changed" - name: run test script that creates a file again script: test_script_creates_file.ps1 {{ test_win_script_filename }} @@ -128,9 +128,9 @@ - name: check that the script did not run since the remote file exists assert: that: - - "not test_script_creates_file_again_result | failed" - - "not test_script_creates_file_again_result | changed" - - "test_script_creates_file_again_result | skipped" + - "test_script_creates_file_again_result is not failed" + - "test_script_creates_file_again_result is not changed" + - "test_script_creates_file_again_result is skipped" - name: run test script that removes a file script: test_script_removes_file.ps1 {{ test_win_script_filename }} @@ -144,8 +144,8 @@ - "test_script_removes_file_result.rc == 0" - "not test_script_removes_file_result.stdout" - "not test_script_removes_file_result.stderr" - - "not test_script_removes_file_result | failed" - - "test_script_removes_file_result | changed" + - "test_script_removes_file_result is not failed" + - "test_script_removes_file_result is changed" - name: run test script that removes a file again script: test_script_removes_file.ps1 {{ test_win_script_filename }} @@ -156,9 +156,9 @@ - name: check that the script did not run since the remote file does not exist assert: that: - - "not test_script_removes_file_again_result | failed" - - "not test_script_removes_file_again_result | changed" - - "test_script_removes_file_again_result | skipped" + - "test_script_removes_file_again_result is not failed" + - "test_script_removes_file_again_result is not changed" + - "test_script_removes_file_again_result is skipped" # TODO: these tests fail on 2008 (not even R2) with no output. It's related to the default codepage being UTF8- if we force it back to 437, it works fine. # Need to figure out a sane place to do that under the new exec wrapper. @@ -173,8 +173,8 @@ # - "test_batch_result.stdout" # - "'batch' in test_batch_result.stdout" # - "not test_batch_result.stderr" -# - "not test_batch_result | failed" -# - "test_batch_result | changed" +# - "test_batch_result is not failed" +# - "test_batch_result is changed" #- name: run simple batch file with .cmd extension @@ -188,8 +188,8 @@ # - "test_cmd_result.stdout" # - "'cmd extension' in test_cmd_result.stdout" # - "not test_cmd_result.stderr" -# - "not test_cmd_result | failed" -# - "test_cmd_result | changed" +# - "test_cmd_result is not failed" +# - "test_cmd_result is changed" - name: run test script that takes a boolean parameter script: test_script_bool.ps1 $true @@ -211,7 +211,7 @@ #- name: ensure that script ran and that environment var was passed # assert: # that: -# - test_script_env_result | succeeded +# - test_script_env_result is successful # - test_script_env_result.stdout_lines[0] == 'task' # @@ -232,7 +232,7 @@ - name: Assert that a change was reported but the script did not make changes assert: that: - - test_script_creates_file_check_mode | changed + - test_script_creates_file_check_mode is changed - not create_file_stat.stat.exists - name: Run test script that creates a file @@ -255,5 +255,5 @@ - name: Assert that a change was reported but the script did not make changes assert: that: - - test_script_removes_file_check_mode | changed + - test_script_removes_file_check_mode is changed - remove_file_stat.stat.exists |