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

Move inspec controls from verify-mm dir to verify #49

Merged
merged 1 commit into from
Dec 13, 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
35 changes: 35 additions & 0 deletions test/integration/verify/controls/google_compute_ssl_policies.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
# ----------------------------------------------------------------------------
#
# 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_compute_ssl_policies resource.'

project_name = attribute(:gcp_project_name, default: '')
ssl_policy = attribute('ssl_policy', default: {"name"=>"inspec-gcp-ssl-policy", "min_tls_version"=>"TLS_1_2", "profile"=>"CUSTOM", "custom_feature"=>"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "custom_feature2"=>"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"})
control 'google_compute_ssl_policies-1.0' do
impact 1.0
title 'google_compute_ssl_policies resource test'

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

google_compute_ssl_policies({project: project_name}).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
30 changes: 30 additions & 0 deletions test/integration/verify/controls/google_compute_ssl_policy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
# ----------------------------------------------------------------------------
#
# 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_compute_ssl_policy resource.'

project_name = attribute(:gcp_project_name, default: '')
ssl_policy = attribute('ssl_policy', default: {"name"=>"inspec-gcp-ssl-policy", "min_tls_version"=>"TLS_1_2", "profile"=>"CUSTOM", "custom_feature"=>"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "custom_feature2"=>"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"})
control 'google_compute_ssl_policy-1.0' do
impact 1.0
title 'google_compute_ssl_policy resource test'

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