summaryrefslogtreecommitdiffstats
path: root/test/integration/targets
diff options
context:
space:
mode:
authorJordan Borean <jborean93@gmail.com>2018-04-05 23:59:51 +0200
committerMatt Davis <nitzmahone@users.noreply.github.com>2018-04-05 23:59:51 +0200
commit71e8527d7cc5ac9110ac6b440e6c389de4a09763 (patch)
tree3392efa7377c5fde3dd73fe64eb9287188c35728 /test/integration/targets
parentwin_setup: Added connection name to interfaces (#37327) (diff)
downloadansible-71e8527d7cc5ac9110ac6b440e6c389de4a09763.tar.xz
ansible-71e8527d7cc5ac9110ac6b440e6c389de4a09763.zip
powershell: display non-ascii characters in command outputs (#37229)
Diffstat (limited to 'test/integration/targets')
-rw-r--r--test/integration/targets/win_async_wrapper/tasks/main.yml14
-rw-r--r--test/integration/targets/win_become/tasks/main.yml14
-rw-r--r--test/integration/targets/win_command/tasks/main.yml13
-rw-r--r--test/integration/targets/win_shell/tasks/main.yml13
4 files changed, 54 insertions, 0 deletions
diff --git a/test/integration/targets/win_async_wrapper/tasks/main.yml b/test/integration/targets/win_async_wrapper/tasks/main.yml
index fbeaad31ea..38b4d528ca 100644
--- a/test/integration/targets/win_async_wrapper/tasks/main.yml
+++ b/test/integration/targets/win_async_wrapper/tasks/main.yml
@@ -144,6 +144,20 @@
# TODO: re-enable after catastrophic failure behavior is cleaned up
# - asyncresult.msg is search('failing via exception')
+- name: echo some non ascii characters
+ win_command: cmd.exe /c echo über den Fußgängerübergang gehen
+ async: 10
+ poll: 1
+ register: nonascii_output
+
+- name: assert echo some non ascii characters
+ assert:
+ that:
+ - nonascii_output is changed
+ - nonascii_output.rc == 0
+ - nonascii_output.stdout_lines|count == 1
+ - nonascii_output.stdout_lines[0] == 'über den Fußgängerübergang gehen'
+ - nonascii_output.stderr == ''
# FUTURE: figure out why the last iteration of this test often fails on shippable
#- name: loop async success
diff --git a/test/integration/targets/win_become/tasks/main.yml b/test/integration/targets/win_become/tasks/main.yml
index a2ec24b604..a71e2bb9c9 100644
--- a/test/integration/targets/win_become/tasks/main.yml
+++ b/test/integration/targets/win_become/tasks/main.yml
@@ -266,6 +266,20 @@
- become_netcredentials.label.account_name == 'High Mandatory Level'
- become_netcredentials.label.sid == 'S-1-16-12288'
+ - name: echo some non ascii characters
+ win_command: cmd.exe /c echo über den Fußgängerübergang gehen
+ vars: *become_vars
+ register: nonascii_output
+
+ - name: assert echo some non ascii characters
+ assert:
+ that:
+ - nonascii_output is changed
+ - nonascii_output.rc == 0
+ - nonascii_output.stdout_lines|count == 1
+ - nonascii_output.stdout_lines[0] == 'über den Fußgängerübergang gehen'
+ - nonascii_output.stderr == ''
+
# FUTURE: test raw + script become behavior once they're running under the exec wrapper again
# FUTURE: add standalone playbook tests to include password prompting and play become keywords
diff --git a/test/integration/targets/win_command/tasks/main.yml b/test/integration/targets/win_command/tasks/main.yml
index d99c22e36e..f1fc8b7e4a 100644
--- a/test/integration/targets/win_command/tasks/main.yml
+++ b/test/integration/targets/win_command/tasks/main.yml
@@ -222,3 +222,16 @@
- cmdout.stdout_lines|count == 1
- cmdout.stdout_lines[0] == "some input"
- cmdout.stderr == ""
+
+- name: echo some non ascii characters
+ win_command: cmd.exe /c echo über den Fußgängerübergang gehen
+ register: nonascii_output
+
+- name: assert echo some non ascii characters
+ assert:
+ that:
+ - nonascii_output is changed
+ - nonascii_output.rc == 0
+ - nonascii_output.stdout_lines|count == 1
+ - nonascii_output.stdout_lines[0] == 'über den Fußgängerübergang gehen'
+ - nonascii_output.stderr == ''
diff --git a/test/integration/targets/win_shell/tasks/main.yml b/test/integration/targets/win_shell/tasks/main.yml
index 4680e417ed..867fe237dd 100644
--- a/test/integration/targets/win_shell/tasks/main.yml
+++ b/test/integration/targets/win_shell/tasks/main.yml
@@ -244,3 +244,16 @@
- shellout.rc == 0
- shellout.stderr == ""
- shellout.stdout == "some input\r\n"
+
+- name: echo some non ascii characters
+ win_shell: Write-Host über den Fußgängerübergang gehen
+ register: nonascii_output
+
+- name: assert echo some non ascii characters
+ assert:
+ that:
+ - nonascii_output is changed
+ - nonascii_output.rc == 0
+ - nonascii_output.stdout_lines|count == 1
+ - nonascii_output.stdout_lines[0] == 'über den Fußgängerübergang gehen'
+ - nonascii_output.stderr == ''