-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from cloudamatic/rpc_issue_100
Fixup inspec to use deploy ids instead of BOK
- Loading branch information
Showing
6 changed files
with
79 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Example InSpec Profile | ||
|
||
This example shows the implementation of an InSpec profile. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
include_controls 'mu-tools-test' | ||
node =json('/tmp/chef_node.json').params | ||
control 'apache' do | ||
title 'This will test apache2 recipe' | ||
%w(apache2 apache2-bin apache2-data apache2-utils).each do |pack| | ||
describe package(pack) do | ||
it { should be_installed } | ||
end | ||
end | ||
|
||
describe service('apache2') do | ||
it { should be_installed } | ||
it { should be_enabled } | ||
it { should be_running } | ||
end | ||
end | ||
|
||
control 'php' do | ||
title 'This will test the php recipe' | ||
%w(php7.0).each do |pack| | ||
describe package(pack) do | ||
it { should be_installed } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# encoding: utf-8 | ||
# copyright: 2018, The Authors | ||
|
||
title 'sample section' | ||
|
||
# you can also use plain tests | ||
describe file('/tmp') do | ||
it { should be_directory } | ||
end | ||
|
||
# you add controls here | ||
control 'tmp-1.0' do # A unique ID for this control | ||
impact 0.7 # The criticality, if this control fails. | ||
title 'Create /tmp directory' # A human-readable title | ||
desc 'An optional description...' | ||
describe file('/tmp') do # The actual test | ||
it { should be_directory } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
lockfile_version: 1 | ||
depends: | ||
- name: mu-tools-test | ||
resolved_source: | ||
path: "/opt/mu/lib/test/mu-tools-test" | ||
version_constraints: "[]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: simple-server-php-test | ||
title: InSpec Profile | ||
maintainer: The Authors | ||
copyright: The Authors | ||
copyright_email: [email protected] | ||
license: Apache-2.0 | ||
summary: An InSpec Compliance Profile | ||
version: 0.1.0 | ||
depends: | ||
- name: mu-tools-test | ||
path: ../mu-tools-test | ||
|