Skip to content

Commit

Permalink
Remove redundant supertest
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed Nov 17, 2022
1 parent e883740 commit e821310
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 9 deletions.
5 changes: 1 addition & 4 deletions x-pack/test/functional/services/actions/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* 2.0.
*/

import type SuperTest from 'supertest';
import { FtrProviderContext } from '../../ftr_provider_context';

export function ActionsAPIServiceProvider({ getService }: FtrProviderContext) {
Expand All @@ -17,15 +16,13 @@ export function ActionsAPIServiceProvider({ getService }: FtrProviderContext) {
config,
secrets,
connectorTypeId,
supertest,
}: {
name: string;
config: Record<string, unknown>;
secrets: Record<string, unknown>;
connectorTypeId: string;
supertest: SuperTest.SuperTest<SuperTest.Test>;
}) {
const { body: createdAction } = await supertest
const { body: createdAction } = await kbnSupertest
.post(`/api/actions/connector`)
.set('kbn-xsrf', 'foo')
.send({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
config: { apiUrl: 'https//test.com' },
secrets: { apiKey: '1234' },
connectorTypeId: '.opsgenie',
supertest,
});
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
config: { url: simulatorUrl },
secrets: { email: '[email protected]', token: 'apiToken' },
connectorTypeId: '.tines',
supertest,
});
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export const createSlackConnector = async ({
config: {},
secrets: { webhookUrl: 'https://test.com' },
connectorTypeId: '.slack',
supertest,
});

return connector;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const screenshotDirectories = ['response_ops_docs', 'stack_alerting'];
const pageObjects = getPageObjects(['common', 'header']);
const actions = getService('actions');
const supertest = getService('supertest');

describe('list view', function () {
let serverLogConnectorId: string;
Expand Down Expand Up @@ -44,7 +43,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
config: {},
secrets: {},
connectorTypeId: '.server-log',
supertest,
});
};
}

0 comments on commit e821310

Please sign in to comment.