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.
This commit is contained in:
Julian Tölle 2023-04-03 12:40:55 +02:00 committed by GitHub
parent 25bce7eabd
commit 9700099097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,21 @@
# Copyright: (c) 2022, Hetzner Cloud GmbH <info@hetzner-cloud.de>
# 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"