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_shell | |
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_shell')
-rw-r--r-- | test/integration/targets/win_shell/tasks/main.yml | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/test/integration/targets/win_shell/tasks/main.yml b/test/integration/targets/win_shell/tasks/main.yml index aeaf0eb373..3366103439 100644 --- a/test/integration/targets/win_shell/tasks/main.yml +++ b/test/integration/targets/win_shell/tasks/main.yml @@ -5,8 +5,8 @@ - name: validate result assert: that: - - shellout|success - - shellout|changed + - shellout is successful + - shellout is changed - shellout.cmd == 'Write-Output "hello from Ansible"' - shellout.delta is match('^\d:(\d){2}:(\d){2}.(\d){6}$') - shellout.end is match('^(\d){4}\-(\d){2}\-(\d){2} (\d){2}:(\d){2}:(\d){2}.(\d){6}$') @@ -26,8 +26,8 @@ - name: validate result assert: that: - - shellout|success - - shellout|changed + - shellout is successful + - shellout is changed - shellout.cmd == 'Write-Output "hello from Ansible"; Write-Output "another line"; Write-Output "yet another line"; Write-Output "envvar was $env:taskvar"' - shellout.delta is match('^\d:(\d){2}:(\d){2}.(\d){6}$') - shellout.end is match('^(\d){4}\-(\d){2}\-(\d){2} (\d){2}:(\d){2}:(\d){2}.(\d){6}$') @@ -46,9 +46,9 @@ - name: validate result assert: that: - - shellout|failed + - shellout is failed - shellout.failed == true # check the failure key explicitly, since failed does magic with RC - - shellout|changed + - shellout is changed - shellout.cmd == 'bogus_command1234' - shellout.delta is match('^\d:(\d){2}:(\d){2}.(\d){6}$') - shellout.end is match('^(\d){4}\-(\d){2}\-(\d){2} (\d){2}:(\d){2}:(\d){2}.(\d){6}$') @@ -65,8 +65,8 @@ - name: validate result assert: that: - - shellout|success - - shellout|changed + - shellout is successful + - shellout is changed - shellout.cmd == 'Write-Error "it broke"; Write-Output "some output"' - shellout.delta is match('^\d:(\d){2}:(\d){2}.(\d){6}$') - shellout.end is match('^(\d){4}\-(\d){2}\-(\d){2} (\d){2}:(\d){2}:(\d){2}.(\d){6}$') @@ -90,8 +90,8 @@ - name: validate result assert: that: - - shellout|success - - shellout|changed + - shellout is successful + - shellout is changed - name: run again with creates, should skip win_shell: echo $null >> c:\testfile.txt @@ -102,7 +102,7 @@ - name: validate result assert: that: - - shellout|skipped + - shellout is skipped - shellout.msg is search('exists') - name: test creates with hidden system file, should skip @@ -114,7 +114,7 @@ - name: validate result assert: that: - - shellout|skipped + - shellout is skipped - shellout.msg is search('exists') - name: ensure testfile is still present @@ -136,8 +136,8 @@ - name: validate result assert: that: - - shellout|success - - shellout|changed + - shellout is successful + - shellout is changed - name: run again with removes, should skip win_shell: echo $null >> c:\testfile.txt @@ -148,7 +148,7 @@ - name: validate result assert: that: - - shellout|skipped + - shellout is skipped - shellout.msg is search('does not exist') - name: run something with known nonzero exit code @@ -159,7 +159,7 @@ - name: validate result assert: that: - - shellout|failed + - shellout is failed - shellout.failed == True # check the failure key explicitly, since failed does magic with RC - shellout.rc == 254 @@ -172,8 +172,8 @@ - name: validate result assert: that: - - shellout|success - - shellout|changed + - shellout is successful + - shellout is changed - shellout.rc == 0 - shellout.stdout == "line1 \r\nline2\r\n" - shellout.stdout_lines == ["line1 ", "line2"] @@ -186,7 +186,7 @@ - name: check job result assert: that: - - shellout | succeeded + - shellout is successful - shellout.stdout_lines[0] == 'yo' - name: interleave large writes between stdout/stderr (check for buffer consumption deadlock) @@ -210,7 +210,7 @@ - name: assert run stdin test assert: that: - - shellout|changed + - shellout is changed - shellout.rc == 0 - shellout.stderr == "" - shellout.stdout == "some input\r\n" |