Skip to content

Commit

Permalink
test: add test for config_files
Browse files Browse the repository at this point in the history
  • Loading branch information
daks committed Dec 18, 2019
1 parent a9901a4 commit e0103aa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,18 @@ suites:
base:
'*':
- rabbitmq
- rabbitmq.config_files
pillars:
top.sls:
base:
'*':
- rabbitmq
pillars_from_files:
rabbitmq.sls: pillar.example
dependencies:
- name: files
path: ./test/salt

verifier:
inspec_tests:
- path: test/integration/default
Expand Down
11 changes: 11 additions & 0 deletions test/integration/default/controls/config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

control 'rabbitmq configuration' do
title 'should match desired lines'

describe file('/etc/rabbitmq/rabbitmq.conf') do
it { should exist }
it { should be_file }
its('content') { should include '# Config file for rabbitmq' }
end
end
1 change: 1 addition & 0 deletions test/salt/files/rabbitmq/rabbitmq.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Config file for rabbitmq

0 comments on commit e0103aa

Please sign in to comment.