From a19ae28326ce861c0eeae803e939050b5bcd64bd Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 25 Feb 2020 17:57:49 -0800 Subject: [PATCH] Test the delay option in wait_for_connection. --- .../targets/wait_for_connection/tasks/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/integration/targets/wait_for_connection/tasks/main.yml b/test/integration/targets/wait_for_connection/tasks/main.yml index 613209e84cd..19749e686e5 100644 --- a/test/integration/targets/wait_for_connection/tasks/main.yml +++ b/test/integration/targets/wait_for_connection/tasks/main.yml @@ -4,6 +4,19 @@ sleep: 1 timeout: 10 +- name: Test normal connection to target node with delay + wait_for_connection: + connect_timeout: 5 + sleep: 1 + timeout: 10 + delay: 3 + register: result + +- name: Verify delay was honored + assert: + that: + - result.elapsed >= 3 + - name: Use invalid parameter wait_for_connection: foo: bar