1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00

fix tests

This commit is contained in:
Lukas Kämmerling 2020-06-26 14:24:10 +02:00
parent d3bac8bdd9
commit 2b53cd32e4
2 changed files with 2 additions and 4 deletions

View file

@ -216,9 +216,9 @@ class AnsibleHcloudLoadBalancer(Hcloud):
self._mark_as_changed()
delete_protection = self.module.params.get("delete_protection")
if delete_protection is not None and delete_protection != self.hcloud_network.protection["delete"]:
if delete_protection is not None and delete_protection != self.hcloud_load_balancer.protection["delete"]:
if not self.module.check_mode:
self.hcloud_network.change_protection(delete=delete_protection).wait_until_finished()
self.hcloud_load_balancer.change_protection(delete=delete_protection).wait_until_finished()
self._mark_as_changed()
self._get_load_balancer()
except APIException as e:

View file

@ -70,7 +70,6 @@
that:
- result_after_test is changed
- result_after_test.hcloud_load_balancer.delete_protection is sameas true
- result_after_test.hcloud_load_balancer.rebuild_protection is sameas true
- name: test Load Balancer without protection set to be idempotent
hcloud_load_balancer:
@ -81,7 +80,6 @@
that:
- result_after_test is not changed
- result_after_test.hcloud_load_balancer.delete_protection is sameas true
- result_after_test.hcloud_load_balancer.rebuild_protection is sameas true
- name: test delete Load Balancer fails if it is protected
hcloud_load_balancer: