From cc1784084c079c8f4acbf6ffdc285157281fd4c0 Mon Sep 17 00:00:00 2001
From: Chris Hawk <hawk@google.com>
Date: Thu, 7 Nov 2024 11:40:49 -0800
Subject: [PATCH] Add a test that updates a pubsub subscription

---
 .../gcp_pubsub_subscription/tasks/autogen.yml     | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tests/integration/targets/gcp_pubsub_subscription/tasks/autogen.yml b/tests/integration/targets/gcp_pubsub_subscription/tasks/autogen.yml
index 6aeaa58..711ca35 100644
--- a/tests/integration/targets/gcp_pubsub_subscription/tasks/autogen.yml
+++ b/tests/integration/targets/gcp_pubsub_subscription/tasks/autogen.yml
@@ -73,6 +73,21 @@
     that:
       - result.changed == false
 #----------------------------------------------------------
+- name: Update a subscription
+  google.cloud.gcp_pubsub_subscription:
+    name: "{{ resource_name }}"
+    topic: "{{ topic }}"
+    ack_deadline_seconds: 60
+    project: "{{ gcp_project }}"
+    auth_kind: "{{ gcp_cred_kind }}"
+    service_account_file: "{{ gcp_cred_file | default(omit) }}"
+    state: present
+  register: result
+- name: Assert changed is true
+  ansible.builtin.assert:
+    that:
+      - result.changed == true
+#----------------------------------------------------------
 - name: Delete a subscription
   google.cloud.gcp_pubsub_subscription:
     name: "{{ resource_name }}"