# ----------------------------------------------------------------------------
#
#     ***     AUTO GENERATED CODE    ***    AUTO GENERATED CODE     ***
#
# ----------------------------------------------------------------------------
#
#     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_memcache_instance 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 region.')
memcache_instance = attribute('memcache_instance', default: {
  "name": "mem-instance"
}, description: 'Memcache settings')
control 'google_memcache_instance-1.0' do
  impact 1.0
  title 'google_memcache_instance resource test'

  describe google_memcache_instance(project: gcp_project_id, region: gcp_location, name: memcache_instance['name']) do
    it { should exist }
    its('node_count') { should cmp 1 }
  end

  describe google_memcache_instance(project: gcp_project_id, region: gcp_location, name: "nonexistent") do
    it { should_not exist }
  end
end
