mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Bug fixes for gcp_pubsub_subscription (#42833)
This commit is contained in:
@@ -15,12 +15,10 @@
|
||||
# Pre-test setup
|
||||
- name: create a topic
|
||||
gcp_pubsub_topic:
|
||||
name: 'topic-subscription'
|
||||
name: "topic-subscription"
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
scopes:
|
||||
- https://www.googleapis.com/auth/pubsub
|
||||
state: present
|
||||
register: topic
|
||||
- name: delete a subscription
|
||||
@@ -28,13 +26,11 @@
|
||||
name: "{{ resource_name }}"
|
||||
topic: "{{ topic }}"
|
||||
push_config:
|
||||
push_endpoint: 'https://myapp.graphite.cloudnativeapp.com/webhook/sub1'
|
||||
push_endpoint: https://myapp.graphite.cloudnativeapp.com/webhook/sub1
|
||||
ack_deadline_seconds: 300
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
scopes:
|
||||
- https://www.googleapis.com/auth/pubsub
|
||||
state: absent
|
||||
#----------------------------------------------------------
|
||||
- name: create a subscription
|
||||
@@ -42,13 +38,11 @@
|
||||
name: "{{ resource_name }}"
|
||||
topic: "{{ topic }}"
|
||||
push_config:
|
||||
push_endpoint: 'https://myapp.graphite.cloudnativeapp.com/webhook/sub1'
|
||||
push_endpoint: https://myapp.graphite.cloudnativeapp.com/webhook/sub1
|
||||
ack_deadline_seconds: 300
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
scopes:
|
||||
- https://www.googleapis.com/auth/pubsub
|
||||
state: present
|
||||
register: result
|
||||
- name: assert changed is true
|
||||
@@ -69,13 +63,11 @@
|
||||
name: "{{ resource_name }}"
|
||||
topic: "{{ topic }}"
|
||||
push_config:
|
||||
push_endpoint: 'https://myapp.graphite.cloudnativeapp.com/webhook/sub1'
|
||||
push_endpoint: https://myapp.graphite.cloudnativeapp.com/webhook/sub1
|
||||
ack_deadline_seconds: 300
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
scopes:
|
||||
- https://www.googleapis.com/auth/pubsub
|
||||
state: present
|
||||
register: result
|
||||
- name: assert changed is false
|
||||
@@ -88,13 +80,11 @@
|
||||
name: "{{ resource_name }}"
|
||||
topic: "{{ topic }}"
|
||||
push_config:
|
||||
push_endpoint: 'https://myapp.graphite.cloudnativeapp.com/webhook/sub1'
|
||||
push_endpoint: https://myapp.graphite.cloudnativeapp.com/webhook/sub1
|
||||
ack_deadline_seconds: 300
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
scopes:
|
||||
- https://www.googleapis.com/auth/pubsub
|
||||
state: absent
|
||||
register: result
|
||||
- name: assert changed is true
|
||||
@@ -117,13 +107,11 @@
|
||||
name: "{{ resource_name }}"
|
||||
topic: "{{ topic }}"
|
||||
push_config:
|
||||
push_endpoint: 'https://myapp.graphite.cloudnativeapp.com/webhook/sub1'
|
||||
push_endpoint: https://myapp.graphite.cloudnativeapp.com/webhook/sub1
|
||||
ack_deadline_seconds: 300
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
scopes:
|
||||
- https://www.googleapis.com/auth/pubsub
|
||||
state: absent
|
||||
register: result
|
||||
- name: assert changed is false
|
||||
@@ -134,11 +122,9 @@
|
||||
# Post-test teardown
|
||||
- name: delete a topic
|
||||
gcp_pubsub_topic:
|
||||
name: 'topic-subscription'
|
||||
name: "topic-subscription"
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
scopes:
|
||||
- https://www.googleapis.com/auth/pubsub
|
||||
state: absent
|
||||
register: topic
|
||||
|
||||
Reference in New Issue
Block a user