Integration Test fixes for BucketAccessControl and SQL Database (#368)

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
The Magician 2019-08-23 12:22:43 -07:00 committed by Alex Stephen
parent beab56c1e1
commit fa63f28139
6 changed files with 21 additions and 22 deletions

View file

@ -120,7 +120,7 @@ EXAMPLES = '''
- name: create a bucket access control
gcp_storage_bucket_access_control:
bucket: test_object
bucket: "{{ bucket }}"
entity: user-alexstephen@google.com
role: WRITER
project: test_project
@ -220,10 +220,7 @@ def main():
state = module.params['state']
kind = 'storage#bucketAccessControl'
if module.params['id']:
fetch = fetch_resource(module, self_link(module), kind)
else:
fetch = {}
fetch = fetch_resource(module, self_link(module), kind)
changed = False
if fetch:
@ -286,11 +283,13 @@ def fetch_resource(module, link, kind, allow_not_found=True):
def self_link(module):
return "https://www.googleapis.com/storage/v1/b/{bucket}/acl/{entity}".format(**module.params)
res = {'bucket': replace_resource_dict(module.params['bucket'], 'name'), 'entity': module.params['entity']}
return "https://www.googleapis.com/storage/v1/b/{bucket}/acl/{entity}".format(**res)
def collection(module):
return "https://www.googleapis.com/storage/v1/b/{bucket}/acl".format(**module.params)
res = {'bucket': replace_resource_dict(module.params['bucket'], 'name')}
return "https://www.googleapis.com/storage/v1/b/{bucket}/acl".format(**res)
def return_if_object(module, response, kind, allow_not_found=False):