-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated test cases and added terraform scripts
Signed-off-by: balasubramanian-s <[email protected]>
- Loading branch information
1 parent
476ea64
commit 4cb7151
Showing
9 changed files
with
79 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,6 +142,6 @@ def product_url(_ = nil) | |
end | ||
|
||
def resource_base_url | ||
'{{+parent}}/instances' | ||
'{{parent}}/instances' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,14 +17,22 @@ | |
gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') | ||
|
||
instance = input('instance', value: { | ||
"name": "inspec-instance", | ||
"machine_type": "n1-standard-1", | ||
"tag_1": "foo", | ||
"tag_2": "bar", | ||
"metadata_key": "123", | ||
"metadata_value": "asdf", | ||
"sa_scope": "https://www.googleapis.com/auth/compute.readonly", | ||
"startup_script": "echo hi > /test.txt" | ||
"name": "projects/ppradhan/locations/us-central1/instances/inspec-instance", | ||
"parent": "projects/ppradhan/locations/us-central1", | ||
"type": "DEVELOPER", | ||
"state": "ACTIVE", | ||
"create_time": "2024-10-09T12:34:49.544484250Z", | ||
"update_time": "2024-10-09T12:53:56.928042766Z", | ||
"version": "6.10.1", | ||
"service_account": "cloud-datafusion-management-sa@b0ed40f9567706323-tp.iam.gserviceaccount.com", | ||
"p4_service_account": "[email protected]", | ||
"serviceEndpoint": "https://inspec-instance-ppradhan-dot-usc1.datafusion.googleusercontent.com", | ||
"zone": "us-central1-c", | ||
"api_endpoint": "https://inspec-instance-ppradhan-dot-usc1.datafusion.googleusercontent.com/api", | ||
"gcs_bucket": "gs://df-1770363587862806578-7atlcp4ghmi67nkzaizbbqaaaa", | ||
"tenant_project_id": "b0ed40f9567706323-tp", | ||
"workforce_identity_service_endpoint": "https://inspec-instance-ppradhan-dot-usc1.datafusion.byoid.googleusercontent.com.", | ||
"patch_revision": "6.10.1.1" | ||
}, description: 'instance description') | ||
control 'google_data_fusion_instance-1.0' do | ||
impact 1.0 | ||
|
@@ -38,20 +46,16 @@ | |
its('create_time') { should cmp instance['create_time'] } | ||
its('update_time') { should cmp instance['update_time'] } | ||
its('state') { should cmp instance['state'] } | ||
its('state_message') { should cmp instance['state_message'] } | ||
its('service_endpoint') { should cmp instance['service_endpoint'] } | ||
its('zone') { should cmp instance['zone'] } | ||
its('version') { should cmp instance['version'] } | ||
its('service_account') { should cmp instance['service_account'] } | ||
its('display_name') { should cmp instance['display_name'] } | ||
its('api_endpoint') { should cmp instance['api_endpoint'] } | ||
its('gcs_bucket') { should cmp instance['gcs_bucket'] } | ||
its('p4service_account') { should cmp instance['p4service_account'] } | ||
its('p4_service_account') { should cmp instance['p4_service_account'] } | ||
its('tenant_project_id') { should cmp instance['tenant_project_id'] } | ||
its('dataproc_service_account') { should cmp instance['dataproc_service_account'] } | ||
its('workforce_identity_service_endpoint') { should cmp instance['workforce_identity_service_endpoint'] } | ||
its('patch_revision') { should cmp instance['patch_revision'] } | ||
|
||
its('tenant_project_id') { should cmp instance['tenant_project_id'] } | ||
its('api_endpoint') { should cmp instance['api_endpoint'] } | ||
its('gcs_bucket') { should cmp instance['gcs_bucket'] } | ||
its('zone') { should cmp instance['zone'] } | ||
end | ||
|
||
describe google_data_fusion_instance(name: "does_not_exit") do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,20 +17,28 @@ | |
gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') | ||
|
||
instance = input('instance', value: { | ||
"name": "inspec-instance", | ||
"machine_type": "n1-standard-1", | ||
"tag_1": "foo", | ||
"tag_2": "bar", | ||
"metadata_key": "123", | ||
"metadata_value": "asdf", | ||
"sa_scope": "https://www.googleapis.com/auth/compute.readonly", | ||
"startup_script": "echo hi > /test.txt" | ||
"name": "projects/ppradhan/locations/us-central1/instances/inspec-instance", | ||
"parent": "projects/ppradhan/locations/us-central1", | ||
"type": "DEVELOPER", | ||
"state": "ACTIVE", | ||
"create_time": "2024-10-09T12:34:49.544484250Z", | ||
"update_time": "2024-10-09T12:53:56.928042766Z", | ||
"version": "6.10.1", | ||
"service_account": "cloud-datafusion-management-sa@b0ed40f9567706323-tp.iam.gserviceaccount.com", | ||
"p4_service_account": "[email protected]", | ||
"serviceEndpoint": "https://inspec-instance-ppradhan-dot-usc1.datafusion.googleusercontent.com", | ||
"zone": "us-central1-c", | ||
"api_endpoint": "https://inspec-instance-ppradhan-dot-usc1.datafusion.googleusercontent.com/api", | ||
"gcs_bucket": "gs://df-1770363587862806578-7atlcp4ghmi67nkzaizbbqaaaa", | ||
"tenant_project_id": "b0ed40f9567706323-tp", | ||
"workforce_identity_service_endpoint": "https://inspec-instance-ppradhan-dot-usc1.datafusion.byoid.googleusercontent.com.", | ||
"patch_revision": "6.10.1.1" | ||
}, description: 'instance description') | ||
control 'google_data_fusion_instances-1.0' do | ||
impact 1.0 | ||
title 'google_data_fusion_instances resource test' | ||
|
||
describe google_data_fusion_instances(parent: instance['parent']) do | ||
describe google_data_fusion_instances(parent: instance['parent']) do | ||
it { should exist } | ||
end | ||
end |