Skip to content

Commit

Permalink
[services/es] don't override user for serverless
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlemeshko committed Jul 5, 2023
1 parent f13a12e commit b74b89e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions packages/kbn-ftr-common-functional-services/services/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ import { FtrProviderContext } from './ftr_provider_context';

export function EsProvider({ getService }: FtrProviderContext): Client {
const config = getService('config');
const isServerless =
config.get('kbnTestServer.serverArgs').filter((arg: string) => arg.startsWith('--serverless'))
.length > 0;

return createEsClientForFtrConfig(config, {
// Use system indices user so tests can write to system indices
authOverride: systemIndicesSuperuser,
});
return createEsClientForFtrConfig(
config,
isServerless
? {}
: {
// Use system indices user so tests can write to system indices
authOverride: systemIndicesSuperuser,
}
);
}

0 comments on commit b74b89e

Please sign in to comment.