From f7e5d391d7537fe91a0b425043b7d83bfb247511 Mon Sep 17 00:00:00 2001 From: Eric Veiras Galisson Date: Mon, 23 Dec 2019 12:14:51 +0100 Subject: [PATCH] test(inspec): test new rabbitmq-env file --- kitchen.yml | 26 ++++++++++++++------- test/integration/default/controls/config.rb | 6 +++++ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index 4ebfae93..0a82a9d1 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -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/ @@ -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 @@ -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 diff --git a/test/integration/default/controls/config.rb b/test/integration/default/controls/config.rb index 5b7a5197..1a120321 100644 --- a/test/integration/default/controls/config.rb +++ b/test/integration/default/controls/config.rb @@ -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