Add xpack license for issue-test since security is not available in the
trial license
This commit is contained in:
parent
dce98bbd34
commit
3ab3b1d05c
3 changed files with 8 additions and 7 deletions
|
|
@ -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' + vars['es_xpack_conf_subdir'] + '/gcusers_roles') do
|
||||
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/users_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' + vars['es_xpack_conf_subdir'] + '/gcusers') do
|
||||
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/users') do
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
it { should contain 'testUser:' }
|
||||
it { should contain 'es_admin:' }
|
||||
end
|
||||
|
||||
|
||||
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcroles.yml') do
|
||||
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/roles.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' + vars['es_xpack_conf_subdir'] + '/gcrole_mapping.yml') do
|
||||
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/role_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' + vars['es_xpack_conf_subdir'] + '/gcsystem_key') do
|
||||
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/system_key') do
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
it { should be_writable.by('owner') }
|
||||
it { should be_writable.by_user('elasticsearch') }
|
||||
|
|
|
|||
|
|
@ -127,11 +127,11 @@ shared_examples 'xpack_standard::init' do |vars|
|
|||
end
|
||||
|
||||
#Test users file, users_roles and roles.yml
|
||||
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcusers_roles') do
|
||||
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/users_roles') do
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/gcusers') do
|
||||
describe file('/etc/elasticsearch/security_node' + vars['es_xpack_conf_subdir'] + '/users') do
|
||||
it { should be_owned_by 'elasticsearch' }
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
roles:
|
||||
- role: elasticsearch
|
||||
es_instance_name: "security_node"
|
||||
es_xpack_license: "{{ lookup('file', '/tmp/license.json') }}"
|
||||
es_config:
|
||||
xpack.security.enabled: True
|
||||
xpack.security.authc.realms.file1.type: "file"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue