From 9700099097280a1a1421feb992bcd2505d73da31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Mon, 3 Apr 2023 12:40:55 +0200 Subject: [PATCH] test: flaky test for hcloud_server private_network_only (#205) The server that was being handled could still exist from previous tests running in the same suite. This can be fixed by making sure that the server does not exist at the start of this test suite. --- .../hcloud_server/tasks/private_network_only.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/integration/targets/hcloud_server/tasks/private_network_only.yml b/tests/integration/targets/hcloud_server/tasks/private_network_only.yml index 40287e2..a568328 100644 --- a/tests/integration/targets/hcloud_server/tasks/private_network_only.yml +++ b/tests/integration/targets/hcloud_server/tasks/private_network_only.yml @@ -1,6 +1,21 @@ # Copyright: (c) 2022, Hetzner Cloud GmbH # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) --- +- name: setup network 1 to be absent + hcloud_network: + name: "{{ hcloud_network_name }}-1" + state: absent + +- name: setup network 2 to be absent + hcloud_network: + name: "{{ hcloud_network_name }}-2" + state: absent + +- name: setup server to be absent + hcloud_server: + name: "{{ hcloud_server_name }}" + state: absent + - name: setup create network hcloud_network: name: "{{ hcloud_network_name }}-1"