mirror of
https://github.com/inspec/inspec
synced 2024-12-22 02:53:13 +00:00
a6582bea9b
* Remove any "All Rights Reserved" references InSpec is licensed and released under the Apache 2.0 license. This change removes all reference to legacy code files that still had any Copyright or License lines referring to "All Rights Reserved". Signed-off-by: Adam Leff <adam@leff.co> * fix functional tests Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
36 lines
901 B
Ruby
36 lines
901 B
Ruby
# encoding: utf-8
|
|
# copyright: 2016, Chef Software, Inc.
|
|
|
|
title 'Gordon Config Checks'
|
|
|
|
# To pass the test, create the following file
|
|
# ```bash
|
|
# mkdir -p /tmp/gordon
|
|
# cat <<EOF > /tmp/gordon/config.yaml
|
|
# version: '1.0'
|
|
# EOF
|
|
# ```
|
|
control 'gordon-1.0' do
|
|
impact 0.7
|
|
title 'Verify the version number of Gordon'
|
|
desc 'An optional description...'
|
|
tag 'gordon'
|
|
ref 'Gordon Requirements 1.0', uri: 'http://...'
|
|
|
|
# Test using the custom gordon_config Inspec resource
|
|
# Find the resource content here: ../libraries/
|
|
describe gordon_config do
|
|
it { should exist }
|
|
its('version') { should eq('1.0') }
|
|
its('file_size') { should <= 20 }
|
|
its('comma_count') { should eq 0 }
|
|
end
|
|
|
|
# Test the version again to showcase variables
|
|
g = gordon_config
|
|
g_path = g.file_path
|
|
g_version = g.version
|
|
describe file(g_path) do
|
|
its('content') { should match g_version }
|
|
end
|
|
end
|