Skip to content

Commit

Permalink
Rework as an audit-cookbook-only profile
Browse files Browse the repository at this point in the history
Signed-off-by: Clinton Wolfe <[email protected]>
  • Loading branch information
clintoncwolfe committed Feb 11, 2020
1 parent f8e8748 commit 36b1bef
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# run-context InSpec Text Profile
# Audit Cookbook run-context InSpec Test Profile

This is a test inspec profile used to exercise the ability of InSpec to determine how it is being run
under Test Kitchen and Audit Cookbook.
This is a test inspec profile used to exercise the ability of InSpec to detect when it is being run
under Audit Cookbook.

It is not a typical profile and is not intended for normal public consumption, nor is it a good example.
16 changes: 16 additions & 0 deletions controls/during-audit.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@


stack = caller_locations(4)
control "json-stack" do
describe stack.to_json do
it { should be_kind_of String }
end
end

require "inspec/utils/telemetry/run_context"

control "run-context" do
describe Inspec::Telemetry::RunContextProbe.guess_run_context do
it { should cmp "audit-cookbook" }
end
end
7 changes: 0 additions & 7 deletions controls/run-controls.rb

This file was deleted.

4 changes: 2 additions & 2 deletions inspec.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: inspec-test-profile-run-context
name: inspec-test-profile-run-context-audit
title: InSpec Profile
maintainer: InSpec Engineering
copyright: Chef Software, Inc.
copyright_email: [email protected]
license: Apache-2.0
summary: An InSpec Compliance Profile to test inspec run context detection under test-kitchen
summary: An InSpec Compliance Profile to test inspec run context detection under audit-cookbook
version: 0.1.0
supports:
platform: os

0 comments on commit 36b1bef

Please sign in to comment.