Skip to content

Commit

Permalink
fixed typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
YulNaumenko committed Mar 16, 2021
1 parent c62ab0c commit 04aeeff
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async function alwaysFiringExecutor(alertExecutorOptions: any) {
}
}

await services.scopedClusterClient.index({
await services.scopedClusterClient.asCurrentUser.index({
index: params.index,
refresh: 'wait_for',
body: {
Expand Down Expand Up @@ -212,7 +212,7 @@ function getNeverFiringAlertType() {
defaultActionGroupId: 'default',
minimumLicenseRequired: 'basic',
async executor({ services, params, state }) {
await services.scopedClusterClient.index({
await services.scopedClusterClient.asCurrentUser.index({
index: params.index,
refresh: 'wait_for',
body: {
Expand Down Expand Up @@ -252,7 +252,7 @@ function getFailingAlertType() {
defaultActionGroupId: 'default',
minimumLicenseRequired: 'basic',
async executor({ services, params, state }) {
await services.scopedClusterClient.index({
await services.scopedClusterClient.asCurrentUser.index({
index: params.index,
refresh: 'wait_for',
body: {
Expand Down Expand Up @@ -297,7 +297,7 @@ function getAuthorizationAlertType(core: CoreSetup<FixtureStartDeps>) {
let callClusterSuccess = false;
let callClusterError;
try {
await services.scopedClusterClient.index({
await services.scopedClusterClient.asCurrentUser.index({
index: params.callClusterAuthorizationIndex,
refresh: 'wait_for',
body: {
Expand All @@ -313,7 +313,7 @@ function getAuthorizationAlertType(core: CoreSetup<FixtureStartDeps>) {
let callScopedClusterSuccess = false;
let callScopedClusterError;
try {
await scopedClusterClient.index({
await scopedClusterClient.asCurrentUser.index({
index: params.callClusterAuthorizationIndex,
refresh: 'wait_for',
body: {
Expand All @@ -337,7 +337,7 @@ function getAuthorizationAlertType(core: CoreSetup<FixtureStartDeps>) {
savedObjectsClientError = e;
}
// Save the result
await services.scopedClusterClient.index({
await services.scopedClusterClient.asCurrentUser.index({
index: params.index,
refresh: 'wait_for',
body: {
Expand Down Expand Up @@ -416,7 +416,7 @@ function getPatternFiringAlertType() {
}

if (params.reference) {
await services.scopedClusterClient.index({
await services.scopedClusterClient.asCurrentUser.index({
index: ES_TEST_INDEX_NAME,
refresh: 'wait_for',
body: {
Expand Down

0 comments on commit 04aeeff

Please sign in to comment.