# ----------------------------------------------------------------------------
#
#     ***     AUTO GENERATED CODE    ***    Type: MMv1     ***
#
# ----------------------------------------------------------------------------
#
#     This file is automatically generated by Magic Modules and manual
#     changes will be clobbered when the file is regenerated.
#
#     Please read more about how to change this file in README.md and
#     CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------

title 'Test GCP google_sql_operations resource.'

gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.')
gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.')
gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.')
sql_operation = attribute('sql_operation', default: {
  "name": "e5c522f1-8391-4830-a8ff-ff1cc4a7b2a5",
  "status": "DONE",
  "operation_type": "CREATE"
}, description: 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.')

control 'google_sql_operations-1.0' do
  impact 1.0
  title 'google_sql_operations resource test'


  describe google_sql_operations(project: gcp_project_id, instance: gcp_db_instance_name) do
    it { should exist }
    its('names') { should include sql_operation['name'] }
    its('statuses') { should include sql_operation['status'] }
    its('operation_types') { should include sql_operation['operation_type'] }
  end
end
