Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix object remover
Browse files Browse the repository at this point in the history
ersin-erdal committed May 17, 2022
1 parent 521ef6e commit 5e87f3e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 5e87f3e

Please sign in to comment.