diff options
author | Matt Clay <matt@mystile.com> | 2018-01-23 10:54:25 -0800 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2018-01-23 10:54:25 -0800 |
commit | 69132007c0a1352d8157bb54280965587b0fc4da (patch) | |
tree | d14f20c21a1ccceb1c5308ccea8cf09ab3a99649 /test/integration/targets/command_shell | |
parent | eae23d2dbdd26b738a1702e6a064d02df391d48e (diff) | |
download | ansible-69132007c0a1352d8157bb54280965587b0fc4da.tar.gz |
Revert "Move requirements into tests. (#35197)"
This reverts commit 4f6017dc1629361cce6fa3e2e035a4710550db9e.
Diffstat (limited to 'test/integration/targets/command_shell')
-rw-r--r-- | test/integration/targets/command_shell/tasks/main.yml | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/integration/targets/command_shell/tasks/main.yml b/test/integration/targets/command_shell/tasks/main.yml index 858f07d1a8..b8d5438187 100644 --- a/test/integration/targets/command_shell/tasks/main.yml +++ b/test/integration/targets/command_shell/tasks/main.yml @@ -100,6 +100,10 @@ shell: which bash register: bash +- name: locate sha1sum/shasum + shell: which sha1sum || which shasum + register: sha1sum + ## ## command ## @@ -192,7 +196,7 @@ - "command_result5.stdout == 'foobar'" - name: send to stdin literal multiline block - command: "{{ ansible_python_interpreter }} -c 'import hashlib, sys; print(hashlib.sha1((sys.stdin.buffer if hasattr(sys.stdin, \"buffer\") else sys.stdin).read()).hexdigest())'" + command: "{{ sha1sum.stdout }}" args: stdin: |- this is the first line @@ -205,7 +209,7 @@ - name: assert the multiline input was passed correctly assert: that: - - "command_result6.stdout == '9cd0697c6a9ff6689f0afb9136fa62e0b3fee903'" + - "command_result6.stdout == '9cd0697c6a9ff6689f0afb9136fa62e0b3fee903 -'" ## ## shell @@ -274,7 +278,9 @@ "multiline echo" \ "with a new line in quotes" \ - | {{ ansible_python_interpreter }} -c 'import hashlib, sys; print(hashlib.sha1((sys.stdin.buffer if hasattr(sys.stdin, "buffer") else sys.stdin).read()).hexdigest())' + | {{ sha1sum.stdout }} \ + | tr -s ' ' \ + | cut -f1 -d ' ' echo "this is a second line" register: shell_result5 |