Skip to content

Commit

Permalink
add integration test for filtering duplicate test locations
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
  • Loading branch information
chris-rock committed Nov 4, 2016
1 parent a30217f commit c065aee
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ suites:
verifier:
inspec_tests:
- https://github.com/nathenharvey/tmp_compliance_profile.git
- name: duplicates
run_list:
- recipe[os_prepare]
verifier:
inspec_tests:
- path: ./test/integration/duplicates
- path: ./test/integration/duplicates
# before you are able to use the compliance plugin, you need to run
# insecure is only required if you use self-signed certificates
# $ inspec compliance login https://compliance.test --user admin --insecure --token ''
Expand Down
13 changes: 13 additions & 0 deletions test/integration/duplicates/dup.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# encoding: utf-8

# This is an InSpec test, that will be successful the first run. If it is
# executed the second time, the test will fail
path = '/tmp/file'
describe file(path) do
it { should_not exist }
end

# HACK: create a second file to fail tests if they run twice
describe command("mkdir -p #{path}") do
its('exit_status') { should eq 0 }
end

0 comments on commit c065aee

Please sign in to comment.