diff options
author | Jordan Borean <jborean93@gmail.com> | 2017-11-28 09:58:55 +1000 |
---|---|---|
committer | ansibot <ansibot@users.noreply.github.com> | 2017-11-27 18:58:55 -0500 |
commit | 8386201242296e842b03f3e3826fcdbdf2dadfcb (patch) | |
tree | 1481c1559f683da57518ffa25060177aedeead09 /test/integration/targets/stat | |
parent | 4fe08441be093a9cbe968e00606e03e33605207c (diff) | |
download | ansible-8386201242296e842b03f3e3826fcdbdf2dadfcb.tar.gz |
add deprecation for stat get_md5 (#33002)
Diffstat (limited to 'test/integration/targets/stat')
-rw-r--r-- | test/integration/targets/stat/tasks/main.yml | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/test/integration/targets/stat/tasks/main.yml b/test/integration/targets/stat/tasks/main.yml index c1b21f0a36..9cb551e650 100644 --- a/test/integration/targets/stat/tasks/main.yml +++ b/test/integration/targets/stat/tasks/main.yml @@ -44,7 +44,7 @@ - "'isreg' in stat_result.stat" - "'issock' in stat_result.stat" - "'isuid' in stat_result.stat" - - "'md5' in stat_result.stat" + - "'md5' not in stat_result.stat" # Remove in 2.9 - "'checksum' in stat_result.stat" - "stat_result.stat.checksum == '2aae6c35c94fcfb415dbe95f408b9ce91ee846ed'" - "'mode' in stat_result.stat" @@ -63,9 +63,14 @@ - "'xoth' in stat_result.stat" - "'xusr' in stat_result.stat" +- name: check stat of file with get_md5 + stat: path={{output_dir}}/foo.txt get_md5=True + register: stat_result_with_md5 + when: ansible_fips|bool != True + - assert: that: - - "stat_result.stat.md5 == '5eb63bbbe01eeed093cb22bb8f5acdc3'" + - "stat_result_with_md5.stat.md5 == '5eb63bbbe01eeed093cb22bb8f5acdc3'" when: ansible_fips|bool != True - name: make a symlink @@ -144,7 +149,7 @@ - "'isreg' in stat_result.stat" - "'issock' in stat_result.stat" - "'isuid' in stat_result.stat" - - "'md5' in stat_result.stat" + - "'md5' not in stat_result.stat" - "'checksum' in stat_result.stat" - "stat_result.stat.checksum == '2aae6c35c94fcfb415dbe95f408b9ce91ee846ed'" - "'mode' in stat_result.stat" @@ -163,7 +168,15 @@ - "'xoth' in stat_result.stat" - "'xusr' in stat_result.stat" +- name: check stat of a symlink with follow on with get_md5 + stat: + path: "{{ output_dir }}/foo-link" + follow: True + get_md5: yes + register: stat_result_with_md5 + when: ansible_fips|bool != True + - assert: that: - - "stat_result.stat.md5 == '5eb63bbbe01eeed093cb22bb8f5acdc3'" + - "stat_result_with_md5.stat.md5 == '5eb63bbbe01eeed093cb22bb8f5acdc3'" when: ansible_fips|bool != True |