From 75d4ded7362ca13e99de740e5b2d8f0c1dc5d76c Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Sat, 14 Jan 2023 19:57:41 +0000 Subject: [PATCH] tests: updating the route test validating the update of a route works as per concerns raised in #542 --- .../gcp_compute_route/tasks/autogen.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/integration/targets/gcp_compute_route/tasks/autogen.yml b/tests/integration/targets/gcp_compute_route/tasks/autogen.yml index b687de9..bc32b37 100644 --- a/tests/integration/targets/gcp_compute_route/tasks/autogen.yml +++ b/tests/integration/targets/gcp_compute_route/tasks/autogen.yml @@ -87,6 +87,25 @@ assert: that: - result.changed == false +# --- +- name: update a route + google.cloud.gcp_compute_route: + name: "{{ resource_name }}" + dest_range: 192.168.6.0/28 + next_hop_gateway: global/gateways/default-internet-gateway + network: "{{ network }}" + tags: + - backends + - foobar + project: "{{ gcp_project }}" + auth_kind: "{{ gcp_cred_kind }}" + service_account_file: "{{ gcp_cred_file }}" + state: present + register: result +- name: assert changed is true + assert: + that: + - result.changed == true #---------------------------------------------------------- - name: delete a route google.cloud.gcp_compute_route: