Don't use the 'x-pack' subdir now that x-pack is part of core

This commit is contained in:
Michael Russell 2018-06-14 16:33:40 +02:00
parent d8cf1d1f66
commit 77d47e3235
No known key found for this signature in database
GPG key ID: A90C1696496085FE
5 changed files with 32 additions and 19 deletions

View file

@ -146,20 +146,20 @@ shared_examples 'xpack::init' do |vars|
end
#Test users file, users_roles and roles.yml
describe file('/etc/elasticsearch/security_node/x-pack/users_roles') do
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcusers_roles') do
it { should be_owned_by 'elasticsearch' }
it { should contain 'admin:es_admin' }
it { should contain 'power_user:testUser' }
end
describe file('/etc/elasticsearch/security_node/x-pack/users') do
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcusers') do
it { should be_owned_by 'elasticsearch' }
it { should contain 'testUser:' }
it { should contain 'es_admin:' }
end
describe file('/etc/elasticsearch/security_node/x-pack/roles.yml') do
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcroles.yml') do
it { should be_owned_by 'elasticsearch' }
#Test contents as expected
its(:md5sum) { should eq '7800182547287abd480c8b095bf26e9e' }
@ -210,7 +210,7 @@ shared_examples 'xpack::init' do |vars|
end
#Test contents of role_mapping.yml
describe file('/etc/elasticsearch/security_node/x-pack/role_mapping.yml') do
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcrole_mapping.yml') do
it { should be_owned_by 'elasticsearch' }
it { should contain 'power_user:' }
it { should contain '- cn=admins,dc=example,dc=com' }
@ -219,7 +219,7 @@ shared_examples 'xpack::init' do |vars|
end
describe file('/etc/elasticsearch/security_node/x-pack/system_key') do
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcsystem_key') do
it { should be_owned_by 'elasticsearch' }
it { should be_writable.by('owner') }
it { should be_writable.by_user('elasticsearch') }

View file

@ -124,14 +124,15 @@ shared_examples 'xpack_standard::init' do |vars|
it { should be_owned_by 'elasticsearch' }
end
#Test users file, users_roles and roles.yml
describe file('/etc/elasticsearch/security_node/x-pack/users_roles') do
it { should be_owned_by 'elasticsearch' }
end
end
describe file('/etc/elasticsearch/security_node/x-pack/users') do
it { should be_owned_by 'elasticsearch' }
end
#Test users file, users_roles and roles.yml
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcusers_roles') do
it { should be_owned_by 'elasticsearch' }
end
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcusers') do
it { should be_owned_by 'elasticsearch' }
end
describe command('curl -s localhost:9200/_nodes/plugins?pretty=true -u es_admin:changeMeAgain | grep x-pack') do