# ----------------------------------------------------------------------------
#
#     ***     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_apigee_organization_envgroups resource.'

organization_envgroup = input("organization_envgroup", value: {
  "name": "test-env-group",
  "parent": "organizations/ppradhan",
  "hostname": "34.95.97.227.nip.io",
  "state": "ACTIVE"
}, description: "organization_envgroup description")

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

  describe google_apigee_organization_envgroups(parent: organization_envgroup["parent"]) do
    it { should exist }
    its("names") { should include organization_envgroup["name"] }
  end

  describe google_apigee_organization_envgroups(parent: organization_envgroup["parent"]).where(name: organization_envgroup["name"]) do
    it { should exist }
    its("names") { should include organization_envgroup["name"] }
    its("hostnames") { should include [organization_envgroup["hostname"]] }
    its("states") { should include organization_envgroup["state"] }
  end
end
