Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Remove VCR from InSpec #46

Merged
merged 1 commit into from
Dec 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ group :development do
gem 'passgen'
gem 'pry-coolline'
gem 'rake'
gem 'vcr'
gem 'webmock'
end
24 changes: 10 additions & 14 deletions test/integration/verify-mm/controls/google_compute_ssl_policies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#
# ----------------------------------------------------------------------------

require_relative '../vcr_config'

title 'Test GCP google_compute_ssl_policies resource.'

project_name = attribute('project_name', default: 'graphite-test-sam-chef')
Expand All @@ -22,19 +20,17 @@
impact 1.0
title 'google_compute_ssl_policies resource test'

VCR.use_cassette('google_compute_ssl_policies') do
resource = google_compute_ssl_policies({project: project_name})
describe resource do
it { should exist }
its('names') { should include ssl_policy['name'] }
its('profiles') { should include ssl_policy['profile'] }
its('count') { should eq 1 }
end
resource = google_compute_ssl_policies({project: project_name})
describe resource do
it { should exist }
its('names') { should include ssl_policy['name'] }
its('profiles') { should include ssl_policy['profile'] }
its('count') { should eq 1 }
end

resource.names.each do |policy_name|
describe google_compute_ssl_policy({project: project_name, name: policy_name}) do
its('min_tls_version') { should cmp ssl_policy['min_tls_version'] }
end
resource.names.each do |policy_name|
describe google_compute_ssl_policy({project: project_name, name: policy_name}) do
its('min_tls_version') { should cmp ssl_policy['min_tls_version'] }
end
end
end
16 changes: 6 additions & 10 deletions test/integration/verify-mm/controls/google_compute_ssl_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#
# ----------------------------------------------------------------------------

require_relative '../vcr_config'

title 'Test GCP google_compute_ssl_policy resource.'

project_name = attribute('project_name', default: 'graphite-test-sam-chef')
Expand All @@ -22,13 +20,11 @@
impact 1.0
title 'google_compute_ssl_policy resource test'

VCR.use_cassette('google_compute_ssl_policy') do
describe google_compute_ssl_policy({project: project_name, name: ssl_policy['name']}) do
it { should exist }
its('min_tls_version') { should cmp ssl_policy['min_tls_version'] }
its('profile') { should cmp ssl_policy['profile'] }
its('custom_features') { should include ssl_policy['custom_feature'] }
its('custom_features') { should include ssl_policy['custom_feature2'] }
end
describe google_compute_ssl_policy({project: project_name, name: ssl_policy['name']}) do
it { should exist }
its('min_tls_version') { should cmp ssl_policy['min_tls_version'] }
its('profile') { should cmp ssl_policy['profile'] }
its('custom_features') { should include ssl_policy['custom_feature'] }
its('custom_features') { should include ssl_policy['custom_feature2'] }
end
end