From a8a0676b595958f8df36a508046d4ad2f46115b9 Mon Sep 17 00:00:00 2001 From: Dale McDiarmid Date: Mon, 19 Sep 2016 14:39:36 +0100 Subject: [PATCH] Tests for role mapping --- test/integration/helpers/serverspec/xpack_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/integration/helpers/serverspec/xpack_spec.rb b/test/integration/helpers/serverspec/xpack_spec.rb index 69583ed..6848c9e 100644 --- a/test/integration/helpers/serverspec/xpack_spec.rb +++ b/test/integration/helpers/serverspec/xpack_spec.rb @@ -211,5 +211,14 @@ shared_examples 'xpack::init' do |es_version| it { should contain 'shield.authc.realms.native1.type: native' } end + #Test contents of role_mapping.yml + describe file('/etc/elasticsearch/shield_node/shield/role_mapping.yml') do + it { should be_owned_by 'elasticsearch' } + it { should contain 'power_user:' } + it { should contain '- cn=admins,dc=example,dc=com' } + it { should contain 'user:' } + it { should contain '- cn=admins,dc=example,dc=com' } + end + end