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

gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.')

job = input('job', value: {
  "job_id": "job-46b1a728",
  "project_id": "ppradhan",
  "region": "europe-west2",
  "driver_output_resource_uri": "gs://dataproc-staging-europe-west2-165434197229-ycz8tbcn/google-cloud-dataproc-metainfo/0c01e2dd-85d5-4bac-9e53-b7c4ebd1c6b8/jobs/job-46b1a728/driveroutput",
  "driver_control_files_uri": "gs://dataproc-staging-europe-west2-165434197229-ycz8tbcn/google-cloud-dataproc-metainfo/0c01e2dd-85d5-4bac-9e53-b7c4ebd1c6b8/jobs/job-46b1a728/",
  "job_uuid": "96a1cb4b-1083-416b-ac8a-3ebd39e478c3"
}, description: 'job description')
control 'google_dataproc_job-1.0' do
  impact 1.0
  title 'google_dataproc_job resource test'

  describe google_dataproc_job(job_id: job['job_id'], project_id: job['project_id'], region: job['region']) do
  	it { should exist }
  	its('driver_output_resource_uri') { should cmp job['driver_output_resource_uri'] }
  	its('driver_control_files_uri') { should cmp job['driver_control_files_uri'] }
  	its('job_uuid') { should cmp job['job_uuid'] }
  end

  describe google_dataproc_job(job_id: job['jobId'], project_id: job['project_id'], region: job['region']) do
  	it { should_not exist }
  end
end
