Skip to content

Commit

Permalink
removing 'xpack.security.enabled=false'
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlemeshko committed Jul 6, 2023
1 parent 1f295aa commit 1919970
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
9 changes: 5 additions & 4 deletions test/common/services/security/system_indices_user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ export async function createSystemIndicesUser(ctx: FtrProviderContext) {
const log = ctx.getService('log');
const config = ctx.getService('config');

const enabled = !config
.get('esTestCluster.serverArgs')
.some((arg: string) => arg === 'xpack.security.enabled=false');
const enabled = !(config.get('esTestCluster.serverArgs') || []).some(
(arg: string) => arg === 'xpack.security.enabled=false'
);
const isServerless = !!config.get('serverless');

if (!enabled) {
if (!enabled || isServerless) {
return;
}

Expand Down
7 changes: 3 additions & 4 deletions test/common/services/security/test_user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ export async function createTestUserService(ctx: FtrProviderContext, role: Role,
const config = ctx.getService('config');

const enabled =
!config
.get('esTestCluster.serverArgs')
.some((arg: string) => arg === 'xpack.security.enabled=false') &&
!config.get('security.disableTestUser');
!(config.get('esTestCluster.serverArgs') || []).some(
(arg: string) => arg === 'xpack.security.enabled=false'
) && !config.get('security.disableTestUser');

if (enabled) {
log.debug('===============creating roles and users===============');
Expand Down
1 change: 0 additions & 1 deletion x-pack/test_serverless/shared/config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default async () => {
esTestCluster: {
license: 'trial',
from: 'snapshot',
serverArgs: ['xpack.security.enabled=false'],
},

kbnTestServer: {
Expand Down

0 comments on commit 1919970

Please sign in to comment.