From 7fd295e02be9f4b9d66c0f26055ef2b0de17886c Mon Sep 17 00:00:00 2001 From: ohdearaugustin Date: Mon, 5 Oct 2020 10:25:01 +0200 Subject: [PATCH] Add assign idempotency test --- .../targets/hcloud_floating_ip/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/integration/targets/hcloud_floating_ip/tasks/main.yml b/tests/integration/targets/hcloud_floating_ip/tasks/main.yml index 8f9d4dc..70f23e3 100644 --- a/tests/integration/targets/hcloud_floating_ip/tasks/main.yml +++ b/tests/integration/targets/hcloud_floating_ip/tasks/main.yml @@ -213,6 +213,18 @@ - floatingIP is changed - floatingIP.hcloud_floating_ip.server == "{{ main_server.hcloud_server.name }}" +- name: test assign Floating IP idempotency + hcloud_floating_ip: + name: "{{ hcloud_floating_ip_name }}" + description: "changed-description" + type: ipv4 + server: "{{ main_server.hcloud_server.name }}" + register: floatingIP +- name: verify test unassign Floating IPidempotency + assert: + that: + - floatingIP is not changed + - name: test unassign Floating IP hcloud_floating_ip: name: "{{ hcloud_floating_ip_name }}"