Skip to content

Commit

Permalink
Merge pull request #448 from inspec/naming_fix
Browse files Browse the repository at this point in the history
Naming linting fix
  • Loading branch information
sa-progress authored Aug 24, 2023
2 parents ee8a480 + 7d520d0 commit 93b2c9d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Style/AndOr:
Style/Not:
Enabled: false
Naming/FileName:
Enabled: true
Enabled: false
Regex: !ruby/regexp '/^.{3,100}$/'
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Expand Down
4 changes: 3 additions & 1 deletion build/inspec/Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gem 'bundle'
gem 'faraday', '>= 0.16.2'
gem 'google-api-client'
gem 'google-cloud'
gem 'googleauth'
gem 'google-cloud'
gem 'inifile'
gem 'inspec-bin', '4.16.0'
gem 'rubocop', '>= 0.77.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
Expand All @@ -16,37 +18,36 @@

gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.')
dlp = input('dlp', value: {
"name": "i-inspec-gcp-dlp",
"location": "us-east-2",
"type": "INSPECT_JOB",
"state": "ACTIVE",
"name": 'i-inspec-gcp-dlp',
"location": 'us-east-2',
"type": 'INSPECT_JOB',
"state": 'ACTIVE',
"inspectDetails": {
"requestedOptions": {
"snapshotInspectTemplate": "",
"snapshotInspectTemplate": '',
"jobConfig": {
"storageConfig": {
"hybridOptions": {
"description": "test",
"tableOptions": ""
}
}
}
}
"description": 'test',
"tableOptions": '',
},
},
},
},
},
"description": "Description",
"display_name": "Displayname"
}, description: 'DLP ')
"description": 'Description',
"display_name": 'Displayname',
}, description: 'DLP ')
control 'google_data_loss_prevention_stored_info_type-1.0' do
impact 1.0
title 'google_data_loss_prevention_stored_info_type resource test'


describe google_data_loss_prevention_stored_info_type(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}",name: dlp['stored_info_type_name']) do
it { should exist }
its('name') { should cmp dlp['name'] }
describe google_data_loss_prevention_stored_info_type(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}", name: dlp['stored_info_type_name']) do
it { should exist }
its('name') { should cmp dlp['name'] }
end

describe google_data_loss_prevention_stored_info_type(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}", name: 'nonexistent') do
it { should_not exist }
it { should_not exist }
end
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
Expand All @@ -16,34 +18,32 @@

gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.')
dlp = input('dlp', value: {
"name": "i-inspec-gcp-dlp",
"location": "us-east-2",
"type": "INSPECT_JOB",
"state": "ACTIVE",
"name": 'i-inspec-gcp-dlp',
"location": 'us-east-2',
"type": 'INSPECT_JOB',
"state": 'ACTIVE',
"inspectDetails": {
"requestedOptions": {
"snapshotInspectTemplate": "",
"snapshotInspectTemplate": '',
"jobConfig": {
"storageConfig": {
"hybridOptions": {
"description": "test",
"tableOptions": ""
}
}
}
}
"description": 'test',
"tableOptions": '',
},
},
},
},
},
"description": "Description",
"display_name": "Displayname"
}, description: 'DLP ')
"description": 'Description',
"display_name": 'Displayname',
}, description: 'DLP ')
control 'google_data_loss_prevention_stored_info_types-1.0' do
impact 1.0
title 'google_data_loss_prevention_stored_info_types resource test'



describe google_data_loss_prevention_stored_info_types(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}") do
it { should exist }
its('names') { should include dlp['name'] }
it { should exist }
its('names') { should include dlp['name'] }
end
end

0 comments on commit 93b2c9d

Please sign in to comment.