Skip to content

Commit

Permalink
test(inspec): test new rabbitmq-env file
Browse files Browse the repository at this point in the history
  • Loading branch information
daks committed Dec 23, 2019
1 parent 85e2e32 commit f7e5d39
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
26 changes: 17 additions & 9 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,6 @@ provisioner:
salt_copy_filter:
- .kitchen
- .git
# dependencies needed for tests
dependencies:
# extraneous files provided to the formula
- name: files
path: ./test/salt
# states used to prepare the system before tests
- name: states
path: ./test/salt


verifier:
# https://www.inspec.io/
Expand All @@ -200,6 +191,15 @@ suites:
- rabbitmq
pillars_from_files:
rabbitmq.sls: pillar.example
# dependencies needed for tests
dependencies:
# extra files provided to the formula
- name: files
path: ./test/salt
# states used to prepare the system before tests
- name: states
path: ./test/salt

verifier:
inspec_tests:
- path: test/integration/default
Expand All @@ -219,6 +219,14 @@ suites:
- rabbitmq
pillars_from_files:
rabbitmq.sls: pillar.example
# dependencies needed for tests
dependencies:
# extra files provided to the formula
- name: files
path: ./test/salt
# states used to prepare the system before tests
- name: states
path: ./test/salt
verifier:
inspec_tests:
- path: test/integration/default
6 changes: 6 additions & 0 deletions test/integration/default/controls/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@
it { should be_file }
its('content') { should include '# Config file for rabbitmq' }
end

describe file('/etc/rabbitmq/rabbitmq-env.conf') do
it { should exist }
it { should be_file }
its('content') { should include 'RABBITMQ_MNESIA_BASE=/opt/rabbitmq' }
end
end

0 comments on commit f7e5d39

Please sign in to comment.