Skip to content

Commit

Permalink
update test cases
Browse files Browse the repository at this point in the history
Signed-off-by: balasubramanian-s <balasubramanian.s@progress.com>
  • Loading branch information
balasubramanian-s committed Aug 29, 2024
1 parent 81563db commit bc0f6b1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 16 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ The following resources are available in the InSpec GCP Profile
| [google_access_context_manager_access_level](docs/resources/google_access_context_manager_access_level.md) | [google_access_context_manager_access_levels](docs/resources/google_access_context_manager_access_levels.md) |
| [google_access_context_manager_access_policy](docs/resources/google_access_context_manager_access_policy.md) | [google_access_context_manager_access_policies](docs/resources/google_access_context_manager_access_policies.md) |
| [google_access_context_manager_service_perimeter](docs/resources/google_access_context_manager_service_perimeter.md) | [google_access_context_manager_service_perimeters](docs/resources/google_access_context_manager_service_perimeters.md) |
| [google_apigeegoogle_apigee_organization_envgroup](docs/resources/google_apigee_organization_envgroup.md) | [google_apigee_organization_envgroups](docs/resources/google_apigee_organization_envgroups.md) |
| [google_apigee_endpoint_attachment](docs/resources/google_apigee_endpoint_attachment.md) | [google_apigee_endpoint_attachments](docs/resources/google_apigee_endpoint_attachments.md) |
| [google_apigee_organization_envgroup](docs/resources/google_apigee_organization_envgroup.md) | [google_apigee_organization_envgroups](docs/resources/google_apigee_organization_envgroups.md) |
| [google_apigee_organization_envgroup_attachment](docs/resources/google_apigee_organization_envgroup_attachment.md) | [google_apigee_organization_envgroup_attachments](docs/resources/google_apigee_organization_envgroup_attachments.md) |
| [google_appengine_standard_app_version](docs/resources/google_appengine_standard_app_version.md) | [google_appengine_standard_app_versions](docs/resources/google_appengine_standard_app_versions.md) |
| [google_bigquery_dataset](docs/resources/google_bigquery_dataset.md) | [google_bigquery_datasets](docs/resources/google_bigquery_datasets.md) |
Expand Down
8 changes: 7 additions & 1 deletion docs/resources/google_apigee_endpoint_attachments.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ A `google_apigee_endpoint_attachments` is used to test a Google EndpointAttachme

## Examples
```
describe google_apigee_endpoint_attachments() do
describe google_apigee_endpoint_attachments() do
it { should exist }
its('hosts') { should include 'value_host' }
its('connection_states') { should include 'value_connectionstate' }
its('service_attachments') { should include 'value_serviceattachment' }
its('locations') { should include 'value_location' }
its('names') { should include 'value_name' }
its('states') { should include 'value_state' }
end
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.')

endpoint_attachment = input('endpoint_attachment', value: {
"name": "value_name",
"parent": "value_parent",
"host": "value_host",
"connection_state": "value_connectionstate",
"service_attachment": "value_serviceattachment",
"location": "value_location",
"state": "value_state"
"name": "organizations/ppradhan/endpointAttachments/inspec-test-attachment",
"parent": "organizations/ppradhan",
"host": "7.0.0.2",
"connection_state": "ACCEPTED",
"service_attachment": "projects/ppradhan/regions/us-central1/serviceAttachments/my-psc-ilb",
"location": "us-central1",
"state": "ACTIVE"
}, description: 'endpoint_attachment description')
control 'google_apigee_endpoint_attachment-1.0' do
impact 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,25 @@
gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.')

endpoint_attachment = input('endpoint_attachment', value: {
"name": "value_name",
"parent": "value_parent",
"host": "value_host",
"connection_state": "value_connectionstate",
"service_attachment": "value_serviceattachment",
"location": "value_location",
"state": "value_state"
"name": "organizations/ppradhan/endpointAttachments/inspec-test-attachment",
"parent": "organizations/ppradhan",
"host": "7.0.0.2",
"connection_state": "ACCEPTED",
"service_attachment": "projects/ppradhan/regions/us-central1/serviceAttachments/my-psc-ilb",
"location": "us-central1",
"state": "ACTIVE"
}, description: 'endpoint_attachment description')
control 'google_apigee_endpoint_attachments-1.0' do
impact 1.0
title 'google_apigee_endpoint_attachments resource test'

describe google_apigee_endpoint_attachments() do
it { should exist }
its('hosts') { should include endpoint_attachment['host'] }
its('connection_states') { should include endpoint_attachment['connection_state'] }
its('service_attachments') { should include endpoint_attachment['service_attachment'] }
its('locations') { should include endpoint_attachment['location'] }
its('names') { should include endpoint_attachment['name'] }
its('states') { should include endpoint_attachment['state'] }
end
end

0 comments on commit bc0f6b1

Please sign in to comment.