From 5e87f3e58b7e641be3ec4f492860b54536c6e658 Mon Sep 17 00:00:00 2001 From: Ersin Erdal Date: Tue, 17 May 2022 20:49:02 +0200 Subject: [PATCH] fix object remover --- .../group1/tests/alerting/retain_api_key.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/retain_api_key.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/retain_api_key.ts index 2b7f67495c9dc..51b50ae3dc6b3 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/retain_api_key.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/retain_api_key.ts @@ -26,7 +26,7 @@ export default function retainAPIKeyTests({ getService }: FtrProviderContext) { describe(scenario.id, () => { it('should retain the api key when a rule is disabled and then enabled', async () => { - const { body: createdConnector } = await supertest + const { body: createdAction } = await supertest .post(`${getUrlPrefix(space.id)}/api/actions/connector`) .set('kbn-xsrf', 'foo') .send({ @@ -44,7 +44,7 @@ export default function retainAPIKeyTests({ getService }: FtrProviderContext) { getTestRuleData({ actions: [ { - id: createdConnector.id, + id: createdAction.id, group: 'default', params: {}, }, @@ -53,8 +53,7 @@ export default function retainAPIKeyTests({ getService }: FtrProviderContext) { ) .expect(200); objectRemover.add(space.id, createdRule.id, 'rule', 'alerting'); - objectRemover.add(space.id, createdConnector.id, 'connector', 'alerting'); - + objectRemover.add(space.id, createdAction.id, 'action', 'actions'); const { body: { apiKey, apiKeyOwner }, } = await alertUtils.getAPIKeyRequest(createdRule.id);