diff --git a/test/integration/helpers/serverspec/xpack_spec.rb b/test/integration/helpers/serverspec/xpack_spec.rb index 39b3e7c..ce1dc2a 100644 --- a/test/integration/helpers/serverspec/xpack_spec.rb +++ b/test/integration/helpers/serverspec/xpack_spec.rb @@ -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') } diff --git a/test/integration/helpers/serverspec/xpack_standard_spec.rb b/test/integration/helpers/serverspec/xpack_standard_spec.rb index 110373e..794d48e 100644 --- a/test/integration/helpers/serverspec/xpack_standard_spec.rb +++ b/test/integration/helpers/serverspec/xpack_standard_spec.rb @@ -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 diff --git a/test/integration/issue-test.yml b/test/integration/issue-test.yml index 5aaaff6..36229fc 100644 --- a/test/integration/issue-test.yml +++ b/test/integration/issue-test.yml @@ -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"