From a04b1b6174d6e5c73512de66d4edf9def06d15ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20K=C3=A4mmerling?= Date: Tue, 23 Feb 2021 11:53:21 +0100 Subject: [PATCH] Fix tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lukas Kämmerling --- .../targets/hcloud_floating_ip/tasks/main.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/integration/targets/hcloud_floating_ip/tasks/main.yml b/tests/integration/targets/hcloud_floating_ip/tasks/main.yml index b5354a3..1b21cd6 100644 --- a/tests/integration/targets/hcloud_floating_ip/tasks/main.yml +++ b/tests/integration/targets/hcloud_floating_ip/tasks/main.yml @@ -74,7 +74,20 @@ assert: that: - result is failed - - 'result.msg == "one of the following is required: id, name"' + - 'result.msg == "value of type must be one of: ipv4, ipv6, got: ipv5"' + +- name: test invalid location + hcloud_floating_ip: + name: "{{ hcloud_floating_ip_name }}" + type: ipv4 + home_location: "abc" + register: result + ignore_errors: yes +- name: verify invalid location + assert: + that: + - result is failed + - result.msg == "location 'abc' not found" - name: test create Floating IP with check mode hcloud_floating_ip: