diff options
Diffstat (limited to 'test/integration/targets/gcp_kms_key_ring/tasks/autogen.yml')
-rw-r--r-- | test/integration/targets/gcp_kms_key_ring/tasks/autogen.yml | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/test/integration/targets/gcp_kms_key_ring/tasks/autogen.yml b/test/integration/targets/gcp_kms_key_ring/tasks/autogen.yml deleted file mode 100644 index 34999ab1bb..0000000000 --- a/test/integration/targets/gcp_kms_key_ring/tasks/autogen.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2019 Google Inc. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Pre-test setup -- name: delete a key ring - gcp_kms_key_ring: - name: "{{ resource_name }}" - location: us-central1 - project: "{{ gcp_project }}" - auth_kind: "{{ gcp_cred_kind }}" - service_account_file: "{{ gcp_cred_file }}" - state: absent -#---------------------------------------------------------- -- name: create a key ring - gcp_kms_key_ring: - name: "{{ resource_name }}" - location: us-central1 - 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: verify that key_ring was created - gcp_kms_key_ring_info: - location: us-central1 - project: "{{ gcp_project }}" - auth_kind: "{{ gcp_cred_kind }}" - service_account_file: "{{ gcp_cred_file }}" - scopes: - - https://www.googleapis.com/auth/cloudkms - register: results -- name: verify that command succeeded - assert: - that: - - results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 1 -# ---------------------------------------------------------------------------- -- name: create a key ring that already exists - gcp_kms_key_ring: - name: "{{ resource_name }}" - location: us-central1 - project: "{{ gcp_project }}" - auth_kind: "{{ gcp_cred_kind }}" - service_account_file: "{{ gcp_cred_file }}" - state: present - register: result -- name: assert changed is false - assert: - that: - - result.changed == false |