From 91a73cff81476873d73f112406a1c6dae6793c6f Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Sun, 14 Dec 2014 22:40:04 +0000 Subject: [PATCH] Add tests for globbing support --- .../roles/test_command_shell/tasks/main.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/test/integration/roles/test_command_shell/tasks/main.yml b/test/integration/roles/test_command_shell/tasks/main.yml index 877eb11cd6..325e76cffe 100644 --- a/test/integration/roles/test_command_shell/tasks/main.yml +++ b/test/integration/roles/test_command_shell/tasks/main.yml @@ -87,6 +87,15 @@ - name: verify that afile.txt is present file: path={{output_dir_test}}/afile.txt state=file +- name: re-run previous command using creates with globbing + command: "{{output_dir_test | expanduser}}/create_afile.sh {{output_dir_test | expanduser}}/afile.txt creates={{output_dir_test | expanduser}}/afile.*" + register: command_result3 + +- name: assert that creates with globbing is working + assert: + that: + - "command_result3.changed != True" + # removes - name: remove afile.txt with remote_afile.sh via command @@ -94,12 +103,15 @@ - name: verify that afile.txt is absent file: path={{output_dir_test}}/afile.txt state=absent - register: command_result3 -- name: assert that the file was removed by the script +- name: re-run previous command using removes with globbing + command: "{{output_dir_test | expanduser}}/remove_afile.sh {{output_dir_test | expanduser}}/afile.txt removes={{output_dir_test | expanduser}}/afile.*" + register: command_result4 + +- name: assert that removes with globbing is working assert: that: - - "command_result3.changed != True" + - "command_result4.changed != True" ## ## shell