diff options
author | Abhijeet Kasurde <akasurde@redhat.com> | 2025-01-14 16:44:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-14 16:44:29 +0100 |
commit | 5b0d1704962b4634380c20f8ab5d23f80cbc5f52 (patch) | |
tree | b11d9e81535931f61fac8d2944d7d0e6c895e878 /test/integration/targets/get_url/tasks/main.yml | |
parent | Allows iptables chain creation with wait parameter (#84491) (diff) | |
download | ansible-5b0d1704962b4634380c20f8ab5d23f80cbc5f52.tar.xz ansible-5b0d1704962b4634380c20f8ab5d23f80cbc5f52.zip |
get_url: add support for BSD-style digest (#84485)
* Added support for BSD-style digest file to test
checksum of downloaded file.
Fixes: #84476
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Diffstat (limited to 'test/integration/targets/get_url/tasks/main.yml')
-rw-r--r-- | test/integration/targets/get_url/tasks/main.yml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/integration/targets/get_url/tasks/main.yml b/test/integration/targets/get_url/tasks/main.yml index 66bd129368..0ec6afd202 100644 --- a/test/integration/targets/get_url/tasks/main.yml +++ b/test/integration/targets/get_url/tasks/main.yml @@ -376,6 +376,15 @@ 30949cc401e30ac494d695ab8764a9f76aae17c5d73c67f65e9b558f47eff892 *not_target1.txt d0dbfc1945bc83bf6606b770e442035f2c4e15c886ee0c22fb3901ba19900b5b *not_target2.txt +- name: create sha256 checksum file of src in BSD-style checksum (--tag) + copy: + dest: '{{ files_dir }}/sha256sum_bsd_style.txt' + content: | + SHA256 (27617.txt) = b1b6ce5073c8fac263a8fc5edfffdbd5dec1980c784e09c5bc69f8fb6056f006. + SHA256 (71420.txt) = b1b6ce5073c8fac263a8fc5edfffdbd5dec1980c784e09c5bc69f8fb6056f006. + SHA256 (not_target1.txt) = 30949cc401e30ac494d695ab8764a9f76aae17c5d73c67f65e9b558f47eff892 + SHA256 (not_target2.txt) = d0dbfc1945bc83bf6606b770e442035f2c4e15c886ee0c22fb3901ba19900b5b + # completing 27617 with bug 54390 - name: create sha256 checksum only with no filename inside copy: @@ -463,6 +472,17 @@ path: "{{ remote_tmp_dir }}/27617sha256_with_dot.txt" register: stat_result_sha256_with_file_scheme +- name: download src with sha256 checksum url with BSD style checksum + get_url: + url: 'http://localhost:{{ http_port }}/27617.txt' + dest: '{{ remote_tmp_dir }}/27617sha256_with_bsd_style.txt' + checksum: 'sha256:file://{{ files_dir }}/sha256sum_bsd_style.txt' + register: result_sha256_with_bsd_style + +- stat: + path: "{{ remote_tmp_dir }}/27617sha256_with_bsd_style.txt" + register: stat_result_sha256_with_bsd_style + - name: download 71420.txt with sha1 checksum url get_url: url: 'http://localhost:{{ http_port }}/71420.txt' @@ -538,11 +558,13 @@ - result_sha256_with_dot is changed - result_sha256_with_asterisk is changed - result_sha256_with_file_scheme is changed + - result_sha256_with_bsd_style is changed - "stat_result_sha1.stat.exists == true" - "stat_result_sha256.stat.exists == true" - "stat_result_sha256_with_dot.stat.exists == true" - "stat_result_sha256_with_asterisk.stat.exists == true" - "stat_result_sha256_with_file_scheme.stat.exists == true" + - stat_result_sha256_with_bsd_style.stat.exists - result_sha1_71420 is changed - result_sha256_71420 is changed - result_sha256_with_dot_71420 is changed |