From aa67d544fcc51673b4015b3843cb6cf827e7551c Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 6 Jun 2023 10:03:22 -0500 Subject: Handle unreachable errors in fetch properly. Fixes #27816 (#80952) --- .../targets/fetch/roles/fetch_tests/tasks/failures.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/integration/targets/fetch') diff --git a/test/integration/targets/fetch/roles/fetch_tests/tasks/failures.yml b/test/integration/targets/fetch/roles/fetch_tests/tasks/failures.yml index 8a6b5b7b36..d0bf9bdc42 100644 --- a/test/integration/targets/fetch/roles/fetch_tests/tasks/failures.yml +++ b/test/integration/targets/fetch/roles/fetch_tests/tasks/failures.yml @@ -28,6 +28,15 @@ register: failed_fetch_dest_dir ignore_errors: true +- name: Test unreachable + fetch: + src: "{{ remote_tmp_dir }}/orig" + dest: "{{ output_dir }}" + register: unreachable_fetch + ignore_unreachable: true + vars: + ansible_user: wrong + - name: Ensure fetch failed assert: that: @@ -39,3 +48,4 @@ - failed_fetch_no_access.msg is search('file is not readable') - failed_fetch_dest_dir is failed - failed_fetch_dest_dir.msg is search('dest is an existing directory') + - unreachable_fetch is unreachable -- cgit v1.2.3