mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
[FTR] Refactor test/common/services/* -> packages/kbn-ftr-common-functional-[ui-]services/* (#189051)
## Summary Moving common services to respective new homes. Resolves: https://github.com/elastic/kibana/issues/188541 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
61544205cd
commit
09a365850e
70 changed files with 214 additions and 185 deletions
|
@ -203,7 +203,7 @@ Tests should run at the positive security boundary condition, meaning that they
|
||||||
|
|
||||||
The functional UI tests now default to logging in with a user named `test_user` and the roles of this user can be changed dynamically without logging in and out.
|
The functional UI tests now default to logging in with a user named `test_user` and the roles of this user can be changed dynamically without logging in and out.
|
||||||
|
|
||||||
In order to achieve this a new service was introduced called `createTestUserService` (see `test/common/services/security/test_user.ts`). The purpose of this test user service is to create roles defined in the test config files and setRoles() or restoreDefaults().
|
In order to achieve this a new service was introduced called `createTestUserService` (see `packages/kbn-ftr-common-functional-ui-services/services/security/test_user.ts`). The purpose of this test user service is to create roles defined in the test config files and setRoles() or restoreDefaults().
|
||||||
|
|
||||||
An example of how to set the role like how its defined below:
|
An example of how to set the role like how its defined below:
|
||||||
|
|
||||||
|
@ -366,14 +366,14 @@ await testSubjects.click(‘containerButton’);
|
||||||
** `find.allByCssSelector()`
|
** `find.allByCssSelector()`
|
||||||
|
|
||||||
**retry:**:::
|
**retry:**:::
|
||||||
// * Source: {kibana-blob}test/common/services/retry/retry.ts[test/common/services/retry/retry.ts]
|
// * Source: {kibana-blob}packages/kbn-ftr-common-functional-services/services/retry/retry.ts[packages/kbn-ftr-common-functional-services/services/retry/retry.ts]
|
||||||
* Helpers for retrying operations
|
* Helpers for retrying operations
|
||||||
* Popular methods:
|
* Popular methods:
|
||||||
** `retry.try(fn, onFailureBlock)` - Execute `fn` in a loop until it succeeds or the default timeout elapses. The optional `onFailureBlock` is executed before each retry attempt.
|
** `retry.try(fn, onFailureBlock)` - Execute `fn` in a loop until it succeeds or the default timeout elapses. The optional `onFailureBlock` is executed before each retry attempt.
|
||||||
** `retry.tryForTime(ms, fn, onFailureBlock)` - Execute `fn` in a loop until it succeeds or `ms` milliseconds elapses. The optional `onFailureBlock` is executed before each retry attempt.
|
** `retry.tryForTime(ms, fn, onFailureBlock)` - Execute `fn` in a loop until it succeeds or `ms` milliseconds elapses. The optional `onFailureBlock` is executed before each retry attempt.
|
||||||
|
|
||||||
**kibanaServer:**:::
|
**kibanaServer:**:::
|
||||||
// * Source: {kibana-blob}test/common/services/kibana_server/kibana_server.js[test/common/services/kibana_server/kibana_server.js]
|
// * Source: {kibana-blob}packages/kbn-ftr-common-functional-services/services/kibana_server/kibana_server.ts[packages/kbn-ftr-common-functional-services/services/kibana_server/kibana_server.ts]
|
||||||
* Helpers for interacting with {kib}'s server
|
* Helpers for interacting with {kib}'s server
|
||||||
* Commonly used methods:
|
* Commonly used methods:
|
||||||
** `kibanaServer.uiSettings.update()`
|
** `kibanaServer.uiSettings.update()`
|
||||||
|
@ -381,7 +381,7 @@ await testSubjects.click(‘containerButton’);
|
||||||
** `kibanaServer.status.getOverallState()`
|
** `kibanaServer.status.getOverallState()`
|
||||||
|
|
||||||
**esArchiver:**:::
|
**esArchiver:**:::
|
||||||
// * Source: {kibana-blob}test/common/services/es_archiver.ts[test/common/services/es_archiver.ts]
|
// * Source: {kibana-blob}packages/kbn-ftr-common-functional-services/services/es_archiver.ts[packages/kbn-ftr-common-functional-services/services/es_archiver.ts]
|
||||||
* Load/unload archives created with the `esArchiver`
|
* Load/unload archives created with the `esArchiver`
|
||||||
* Popular methods:
|
* Popular methods:
|
||||||
** `esArchiver.load(path)`
|
** `esArchiver.load(path)`
|
||||||
|
@ -393,7 +393,7 @@ Full list of services that are used in functional tests can be found here: {kiba
|
||||||
|
|
||||||
**Low-level utilities:**:::
|
**Low-level utilities:**:::
|
||||||
* es
|
* es
|
||||||
// ** Source: {kibana-blob}test/common/services/es.ts[test/common/services/es.ts]
|
// ** Source: {kibana-blob}packages/kbn-ftr-common-functional-services/services/es.ts[packages/kbn-ftr-common-functional-services/services/es.ts]
|
||||||
** {es} client
|
** {es} client
|
||||||
** Higher level options: `kibanaServer.uiSettings` or `esArchiver`
|
** Higher level options: `kibanaServer.uiSettings` or `esArchiver`
|
||||||
* remote
|
* remote
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { ProvidedType } from '@kbn/test';
|
||||||
export { services as commonFunctionalServices } from './services/all';
|
export { services as commonFunctionalServices } from './services/all';
|
||||||
|
|
||||||
import { KibanaServerProvider } from './services/kibana_server';
|
import { KibanaServerProvider } from './services/kibana_server';
|
||||||
|
export { KibanaServerProvider } from './services/kibana_server';
|
||||||
export type KibanaServer = ProvidedType<typeof KibanaServerProvider>;
|
export type KibanaServer = ProvidedType<typeof KibanaServerProvider>;
|
||||||
|
|
||||||
export { RetryService } from './services/retry';
|
export { RetryService } from './services/retry';
|
||||||
|
@ -18,6 +19,7 @@ import { EsArchiverProvider } from './services/es_archiver';
|
||||||
export type EsArchiver = ProvidedType<typeof EsArchiverProvider>;
|
export type EsArchiver = ProvidedType<typeof EsArchiverProvider>;
|
||||||
|
|
||||||
import { EsProvider } from './services/es';
|
import { EsProvider } from './services/es';
|
||||||
|
export { EsProvider } from './services/es';
|
||||||
export type Es = ProvidedType<typeof EsProvider>;
|
export type Es = ProvidedType<typeof EsProvider>;
|
||||||
|
|
||||||
import { SupertestWithoutAuthProvider } from './services/supertest_without_auth';
|
import { SupertestWithoutAuthProvider } from './services/supertest_without_auth';
|
||||||
|
@ -29,3 +31,10 @@ import { SamlAuthProvider } from './services/saml_auth/saml_auth_provider';
|
||||||
export type SamlAuthProviderType = ProvidedType<typeof SamlAuthProvider>;
|
export type SamlAuthProviderType = ProvidedType<typeof SamlAuthProvider>;
|
||||||
|
|
||||||
export type { FtrProviderContext } from './services/ftr_provider_context';
|
export type { FtrProviderContext } from './services/ftr_provider_context';
|
||||||
|
export { runSavedObjInfoSvc } from './services/saved_object_info';
|
||||||
|
|
||||||
|
export type { BsearchService, SendOptions } from './services/bsearch';
|
||||||
|
export { SavedObjectInfoService } from './services/saved_object_info';
|
||||||
|
export { DeploymentService } from './services/deployment';
|
||||||
|
export { IndexPatternsService } from './services/index_patterns';
|
||||||
|
export { RandomnessService } from './services/randomness';
|
||||||
|
|
|
@ -10,6 +10,13 @@ import { EsArchiverProvider } from './es_archiver';
|
||||||
import { EsProvider } from './es';
|
import { EsProvider } from './es';
|
||||||
import { KibanaServerProvider } from './kibana_server';
|
import { KibanaServerProvider } from './kibana_server';
|
||||||
import { RetryService } from './retry';
|
import { RetryService } from './retry';
|
||||||
|
import { BsearchService } from './bsearch';
|
||||||
|
import { ConsoleProvider } from './console';
|
||||||
|
import { DeploymentService } from './deployment';
|
||||||
|
import { EsDeleteAllIndicesProvider } from './es_delete_all_indices';
|
||||||
|
import { IndexPatternsService } from './index_patterns';
|
||||||
|
import { SavedObjectInfoService } from './saved_object_info';
|
||||||
|
import { RandomnessService } from './randomness';
|
||||||
import { SupertestWithoutAuthProvider } from './supertest_without_auth';
|
import { SupertestWithoutAuthProvider } from './supertest_without_auth';
|
||||||
import { SamlAuthProvider } from './saml_auth';
|
import { SamlAuthProvider } from './saml_auth';
|
||||||
|
|
||||||
|
@ -18,6 +25,13 @@ export const services = {
|
||||||
kibanaServer: KibanaServerProvider,
|
kibanaServer: KibanaServerProvider,
|
||||||
esArchiver: EsArchiverProvider,
|
esArchiver: EsArchiverProvider,
|
||||||
retry: RetryService,
|
retry: RetryService,
|
||||||
|
bsearch: BsearchService,
|
||||||
|
console: ConsoleProvider,
|
||||||
|
deployment: DeploymentService,
|
||||||
|
esDeleteAllIndices: EsDeleteAllIndicesProvider,
|
||||||
|
indexPatterns: IndexPatternsService,
|
||||||
|
savedObjectInfo: SavedObjectInfoService,
|
||||||
|
randomness: RandomnessService,
|
||||||
supertestWithoutAuth: SupertestWithoutAuthProvider,
|
supertestWithoutAuth: SupertestWithoutAuthProvider,
|
||||||
samlAuth: SamlAuthProvider,
|
samlAuth: SamlAuthProvider,
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,7 +12,7 @@ import type SuperTest from 'supertest';
|
||||||
import type { IEsSearchResponse } from '@kbn/search-types';
|
import type { IEsSearchResponse } from '@kbn/search-types';
|
||||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||||
import { BFETCH_ROUTE_VERSION_LATEST } from '@kbn/bfetch-plugin/common';
|
import { BFETCH_ROUTE_VERSION_LATEST } from '@kbn/bfetch-plugin/common';
|
||||||
import { FtrService } from '../ftr_provider_context';
|
import { FtrService } from './ftr_provider_context';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function copied from here:
|
* Function copied from here:
|
||||||
|
@ -62,6 +62,7 @@ export interface SendOptions {
|
||||||
* });
|
* });
|
||||||
* expect(response).eql({ ... your value ... });
|
* expect(response).eql({ ... your value ... });
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export class BsearchService extends FtrService {
|
export class BsearchService extends FtrService {
|
||||||
private readonly retry = this.ctx.getService('retry');
|
private readonly retry = this.ctx.getService('retry');
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { FtrProviderContext } from '../../ftr_provider_context';
|
import type { FtrProviderContext } from './ftr_provider_context';
|
||||||
|
|
||||||
export function helpers(getService: FtrProviderContext['getService']) {
|
export function ConsoleProvider({ getService }: FtrProviderContext) {
|
||||||
const client = getService('es');
|
const client = getService('es');
|
||||||
|
|
||||||
const createIndex = async (indexName: string) => {
|
const createIndex = async (indexName: string) => {
|
|
@ -11,7 +11,7 @@ import { Agent } from 'https';
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import { getUrl } from '@kbn/test';
|
import { getUrl } from '@kbn/test';
|
||||||
|
|
||||||
import { FtrService } from '../ftr_provider_context';
|
import { FtrService } from './ftr_provider_context';
|
||||||
|
|
||||||
export class DeploymentService extends FtrService {
|
export class DeploymentService extends FtrService {
|
||||||
private readonly config = this.ctx.getService('config');
|
private readonly config = this.ctx.getService('config');
|
|
@ -6,7 +6,7 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FtrProviderContext } from '../ftr_provider_context';
|
import { FtrProviderContext } from './ftr_provider_context';
|
||||||
|
|
||||||
export function EsDeleteAllIndicesProvider({ getService }: FtrProviderContext) {
|
export function EsDeleteAllIndicesProvider({ getService }: FtrProviderContext) {
|
||||||
const log = getService('log');
|
const log = getService('log');
|
|
@ -6,10 +6,11 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
import type { DataViewSpec } from '@kbn/data-plugin/common';
|
||||||
|
|
||||||
import { INITIAL_REST_VERSION } from '@kbn/data-views-plugin/server/constants';
|
import { INITIAL_REST_VERSION } from '@kbn/data-views-plugin/server/constants';
|
||||||
import { DataViewSpec } from '@kbn/data-plugin/common';
|
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||||
import { FtrService } from '../ftr_provider_context';
|
import { FtrService } from './ftr_provider_context';
|
||||||
|
|
||||||
export class IndexPatternsService extends FtrService {
|
export class IndexPatternsService extends FtrService {
|
||||||
private readonly kibanaServer = this.ctx.getService('kibanaServer');
|
private readonly kibanaServer = this.ctx.getService('kibanaServer');
|
|
@ -9,7 +9,7 @@
|
||||||
import Chance from 'chance';
|
import Chance from 'chance';
|
||||||
import { ToolingLog } from '@kbn/tooling-log';
|
import { ToolingLog } from '@kbn/tooling-log';
|
||||||
|
|
||||||
import { FtrService } from '../ftr_provider_context';
|
import { FtrService } from './ftr_provider_context';
|
||||||
|
|
||||||
let __CACHED_SEED__: number | undefined;
|
let __CACHED_SEED__: number | undefined;
|
||||||
function getSeed(log: ToolingLog) {
|
function getSeed(log: ToolingLog) {
|
|
@ -13,7 +13,7 @@ import { flow, pipe } from 'fp-ts/function';
|
||||||
import * as TE from 'fp-ts/lib/TaskEither';
|
import * as TE from 'fp-ts/lib/TaskEither';
|
||||||
import * as T from 'fp-ts/lib/Task';
|
import * as T from 'fp-ts/lib/Task';
|
||||||
import { ToolingLog } from '@kbn/tooling-log';
|
import { ToolingLog } from '@kbn/tooling-log';
|
||||||
import { FtrService } from '../../ftr_provider_context';
|
import { FtrService } from '../ftr_provider_context';
|
||||||
import { print } from './utils';
|
import { print } from './utils';
|
||||||
|
|
||||||
const pluck =
|
const pluck =
|
|
@ -16,8 +16,15 @@
|
||||||
"@kbn/es-archiver",
|
"@kbn/es-archiver",
|
||||||
"@kbn/test",
|
"@kbn/test",
|
||||||
"@kbn/expect",
|
"@kbn/expect",
|
||||||
|
"@kbn/search-types",
|
||||||
|
"@kbn/core-http-common",
|
||||||
|
"@kbn/bfetch-plugin",
|
||||||
|
"@kbn/data-plugin",
|
||||||
|
"@kbn/dev-cli-runner",
|
||||||
|
"@kbn/dev-cli-errors",
|
||||||
"@kbn/repo-info",
|
"@kbn/repo-info",
|
||||||
"@kbn/es",
|
"@kbn/es",
|
||||||
|
"@kbn/data-views-plugin"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"target/**/*",
|
"target/**/*",
|
||||||
|
|
|
@ -22,3 +22,4 @@ export {
|
||||||
} from './services/remote/network_profiles';
|
} from './services/remote/network_profiles';
|
||||||
export type { TimeoutOpt } from './types';
|
export type { TimeoutOpt } from './types';
|
||||||
export { TestSubjects } from './services/test_subjects';
|
export { TestSubjects } from './services/test_subjects';
|
||||||
|
export { SecurityService } from './services/security';
|
||||||
|
|
|
@ -12,6 +12,7 @@ import { FindProvider } from './find';
|
||||||
import { TestSubjects } from './test_subjects';
|
import { TestSubjects } from './test_subjects';
|
||||||
import { BrowserProvider } from './browser';
|
import { BrowserProvider } from './browser';
|
||||||
import { ToastsService } from './toasts';
|
import { ToastsService } from './toasts';
|
||||||
|
import { SecurityServiceProvider } from './security';
|
||||||
|
|
||||||
export const services = {
|
export const services = {
|
||||||
retryOnStale: RetryOnStaleProvider,
|
retryOnStale: RetryOnStaleProvider,
|
||||||
|
@ -20,4 +21,5 @@ export const services = {
|
||||||
testSubjects: TestSubjects,
|
testSubjects: TestSubjects,
|
||||||
browser: BrowserProvider,
|
browser: BrowserProvider,
|
||||||
toasts: ToastsService,
|
toasts: ToastsService,
|
||||||
|
security: SecurityServiceProvider,
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,12 +7,18 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { GenericFtrProviderContext, GenericFtrService } from '@kbn/test';
|
import { GenericFtrProviderContext, GenericFtrService } from '@kbn/test';
|
||||||
import { RetryService } from '@kbn/ftr-common-functional-services';
|
import {
|
||||||
|
RetryService,
|
||||||
|
EsProvider,
|
||||||
|
KibanaServerProvider,
|
||||||
|
} from '@kbn/ftr-common-functional-services';
|
||||||
import { services as commonFunctionalUiServices } from './all';
|
import { services as commonFunctionalUiServices } from './all';
|
||||||
|
|
||||||
const services = {
|
const services = {
|
||||||
...commonFunctionalUiServices,
|
...commonFunctionalUiServices,
|
||||||
retry: RetryService,
|
retry: RetryService,
|
||||||
|
es: EsProvider,
|
||||||
|
kibanaServer: KibanaServerProvider,
|
||||||
};
|
};
|
||||||
|
|
||||||
export type FtrProviderContext = GenericFtrProviderContext<typeof services, {}>;
|
export type FtrProviderContext = GenericFtrProviderContext<typeof services, {}>;
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export { SecurityServiceProvider } from './security';
|
export { SecurityService, SecurityServiceProvider } from './security';
|
|
@ -9,7 +9,7 @@
|
||||||
import { Role } from './role';
|
import { Role } from './role';
|
||||||
import { User } from './user';
|
import { User } from './user';
|
||||||
import { RoleMappings } from './role_mappings';
|
import { RoleMappings } from './role_mappings';
|
||||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
import { FtrProviderContext } from '../ftr_provider_context';
|
||||||
import { createTestUserService, TestUserSupertestProvider, TestUser } from './test_user';
|
import { createTestUserService, TestUserSupertestProvider, TestUser } from './test_user';
|
||||||
import { createSystemIndicesUser } from './system_indices_user';
|
import { createSystemIndicesUser } from './system_indices_user';
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {
|
||||||
createEsClientForFtrConfig,
|
createEsClientForFtrConfig,
|
||||||
createRemoteEsClientForFtrConfig,
|
createRemoteEsClientForFtrConfig,
|
||||||
} from '@kbn/test';
|
} from '@kbn/test';
|
||||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
import { FtrProviderContext } from '../ftr_provider_context';
|
||||||
|
|
||||||
const SYSTEM_INDICES_SUPERUSER_ROLE = 'system_indices_superuser';
|
const SYSTEM_INDICES_SUPERUSER_ROLE = 'system_indices_superuser';
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
import { format as formatUrl } from 'url';
|
import { format as formatUrl } from 'url';
|
||||||
import supertest from 'supertest';
|
import supertest from 'supertest';
|
||||||
|
|
||||||
import { type Browser, TestSubjects } from '@kbn/ftr-common-functional-ui-services';
|
import type { Browser } from '../browser';
|
||||||
|
import type { TestSubjects } from '../test_subjects';
|
||||||
import { Role } from './role';
|
import { Role } from './role';
|
||||||
import { User } from './user';
|
import { User } from './user';
|
||||||
import { FtrService, FtrProviderContext } from '../../ftr_provider_context';
|
import { FtrService, FtrProviderContext } from '../ftr_provider_context';
|
||||||
|
|
||||||
const TEST_USER_NAME = 'test_user';
|
const TEST_USER_NAME = 'test_user';
|
||||||
const TEST_USER_PASSWORD = 'changeme';
|
const TEST_USER_PASSWORD = 'changeme';
|
|
@ -7,4 +7,4 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../src/setup_node_env');
|
require('../src/setup_node_env');
|
||||||
require('@kbn/test-suites-src/common/services/saved_object_info').runSavedObjInfoSvc();
|
require('@kbn/ftr-common-functional-services').runSavedObjInfoSvc();
|
||||||
|
|
|
@ -7,14 +7,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { GenericFtrProviderContext } from '@kbn/test';
|
import { GenericFtrProviderContext } from '@kbn/test';
|
||||||
import { services as commonServices } from '../../common/services';
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
|
import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services';
|
||||||
|
|
||||||
import { services as functionalServices } from '../../functional/services';
|
import { services as functionalServices } from '../../functional/services';
|
||||||
import { pageObjects } from '../../functional/page_objects';
|
import { pageObjects } from '../../functional/page_objects';
|
||||||
|
|
||||||
import { KibanaEBTServerProvider, KibanaEBTUIProvider } from './kibana_ebt';
|
import { KibanaEBTServerProvider, KibanaEBTUIProvider } from './kibana_ebt';
|
||||||
|
|
||||||
export const services = {
|
export const services = {
|
||||||
...commonServices,
|
...commonFunctionalServices,
|
||||||
|
...commonFunctionalUIServices,
|
||||||
...functionalServices,
|
...functionalServices,
|
||||||
kibana_ebt_server: KibanaEBTServerProvider,
|
kibana_ebt_server: KibanaEBTServerProvider,
|
||||||
kibana_ebt_ui: KibanaEBTUIProvider,
|
kibana_ebt_ui: KibanaEBTUIProvider,
|
||||||
|
|
|
@ -8,25 +8,11 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
import type { FtrProviderContext } from '../../ftr_provider_context';
|
import type { FtrProviderContext } from '../../ftr_provider_context';
|
||||||
import { helpers } from './helpers';
|
|
||||||
|
|
||||||
export default ({ getService }: FtrProviderContext) => {
|
export default ({ getService }: FtrProviderContext) => {
|
||||||
const {
|
const console = getService('console');
|
||||||
createIndex,
|
|
||||||
createAlias,
|
|
||||||
createLegacyTemplate,
|
|
||||||
createIndexTemplate,
|
|
||||||
createComponentTemplate,
|
|
||||||
createDataStream,
|
|
||||||
deleteIndex,
|
|
||||||
deleteAlias,
|
|
||||||
deleteLegacyTemplate,
|
|
||||||
deleteIndexTemplate,
|
|
||||||
deleteComponentTemplate,
|
|
||||||
deleteDataStream,
|
|
||||||
} = helpers(getService);
|
|
||||||
|
|
||||||
const supertest = getService('supertest');
|
const supertest = getService('supertest');
|
||||||
|
|
||||||
const sendRequest = (query: object) =>
|
const sendRequest = (query: object) =>
|
||||||
supertest.get('/api/console/autocomplete_entities').query(query);
|
supertest.get('/api/console/autocomplete_entities').query(query);
|
||||||
|
|
||||||
|
@ -40,22 +26,26 @@ export default ({ getService }: FtrProviderContext) => {
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
// Setup indices, aliases, templates, and data streams
|
// Setup indices, aliases, templates, and data streams
|
||||||
await createIndex(indexName);
|
await console.createIndex(indexName);
|
||||||
await createAlias(indexName, aliasName);
|
await console.createAlias(indexName, aliasName);
|
||||||
await createComponentTemplate(componentTemplateName);
|
await console.createComponentTemplate(componentTemplateName);
|
||||||
await createIndexTemplate(indexTemplateName, [dataStreamName], [componentTemplateName]);
|
await console.createIndexTemplate(
|
||||||
await createDataStream(dataStreamName);
|
indexTemplateName,
|
||||||
await createLegacyTemplate(legacyTemplateName);
|
[dataStreamName],
|
||||||
|
[componentTemplateName]
|
||||||
|
);
|
||||||
|
await console.createDataStream(dataStreamName);
|
||||||
|
await console.createLegacyTemplate(legacyTemplateName);
|
||||||
});
|
});
|
||||||
|
|
||||||
after(async () => {
|
after(async () => {
|
||||||
// Cleanup indices, aliases, templates, and data streams
|
// Cleanup indices, aliases, templates, and data streams
|
||||||
await deleteAlias(indexName, aliasName);
|
await console.deleteAlias(indexName, aliasName);
|
||||||
await deleteIndex(indexName);
|
await console.deleteIndex(indexName);
|
||||||
await deleteDataStream(dataStreamName);
|
await console.deleteDataStream(dataStreamName);
|
||||||
await deleteIndexTemplate(indexTemplateName);
|
await console.deleteIndexTemplate(indexTemplateName);
|
||||||
await deleteComponentTemplate(componentTemplateName);
|
await console.deleteComponentTemplate(componentTemplateName);
|
||||||
await deleteLegacyTemplate(legacyTemplateName);
|
await console.deleteLegacyTemplate(legacyTemplateName);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not succeed if no settings are provided in query params', async () => {
|
it('should not succeed if no settings are provided in query params', async () => {
|
||||||
|
|
|
@ -6,12 +6,13 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { services as commonServices } from '../../common/services';
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
|
import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services';
|
||||||
import { KibanaSupertestProvider, ElasticsearchSupertestProvider } from './supertest';
|
import { KibanaSupertestProvider, ElasticsearchSupertestProvider } from './supertest';
|
||||||
|
|
||||||
export const services = {
|
export const services = {
|
||||||
...commonServices,
|
...commonFunctionalServices,
|
||||||
|
...commonFunctionalUIServices,
|
||||||
supertest: KibanaSupertestProvider,
|
supertest: KibanaSupertestProvider,
|
||||||
esSupertest: ElasticsearchSupertestProvider,
|
esSupertest: ElasticsearchSupertestProvider,
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { format as formatUrl } from 'url';
|
import { format as formatUrl } from 'url';
|
||||||
import { esTestConfig, kbnTestConfig, kibanaServerTestUser } from '@kbn/test';
|
import { esTestConfig, kbnTestConfig, kibanaServerTestUser } from '@kbn/test';
|
||||||
import { services } from './services';
|
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
const servers = {
|
const servers = {
|
||||||
|
@ -85,6 +84,5 @@ export default function () {
|
||||||
})}`,
|
})}`,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
services,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
||||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
||||||
* Side Public License, v 1.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { GenericFtrProviderContext, GenericFtrService } from '@kbn/test';
|
|
||||||
|
|
||||||
import { services } from './services';
|
|
||||||
|
|
||||||
export type FtrProviderContext = GenericFtrProviderContext<typeof services, {}>;
|
|
||||||
export class FtrService extends GenericFtrService<FtrProviderContext> {}
|
|
|
@ -1,15 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
||||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
||||||
* Side Public License, v 1.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import type { FtrProviderContext } from '../ftr_provider_context';
|
|
||||||
import { helpers } from '../../api_integration/apis/console/helpers';
|
|
||||||
export function ConsoleProvider({ getService }: FtrProviderContext) {
|
|
||||||
return {
|
|
||||||
helpers: helpers(getService),
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -7,17 +7,26 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
import { DeploymentService } from './deployment';
|
import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services';
|
||||||
import { RandomnessService } from './randomness';
|
|
||||||
import { SecurityServiceProvider } from './security';
|
|
||||||
import { EsDeleteAllIndicesProvider } from './es_delete_all_indices';
|
|
||||||
import { SavedObjectInfoService } from './saved_object_info';
|
|
||||||
import { IndexPatternsService } from './index_patterns';
|
|
||||||
import { BsearchService } from './bsearch';
|
|
||||||
import { ConsoleProvider } from './console';
|
|
||||||
|
|
||||||
// pick only services that work for any FTR config, e.g. 'samlAuth' requires SAML setup in config file
|
// pick only services that work for any FTR config, e.g. 'samlAuth' requires SAML setup in config file
|
||||||
const { es, esArchiver, kibanaServer, retry, supertestWithoutAuth } = commonFunctionalServices;
|
const {
|
||||||
|
es,
|
||||||
|
esArchiver,
|
||||||
|
kibanaServer,
|
||||||
|
retry,
|
||||||
|
supertestWithoutAuth,
|
||||||
|
deployment,
|
||||||
|
randomness,
|
||||||
|
esDeleteAllIndices,
|
||||||
|
savedObjectInfo,
|
||||||
|
indexPatterns,
|
||||||
|
bsearch,
|
||||||
|
console,
|
||||||
|
} = commonFunctionalServices;
|
||||||
|
|
||||||
|
// pick what was there previously
|
||||||
|
const { security } = commonFunctionalUIServices;
|
||||||
|
|
||||||
export const services = {
|
export const services = {
|
||||||
es,
|
es,
|
||||||
|
@ -25,12 +34,12 @@ export const services = {
|
||||||
kibanaServer,
|
kibanaServer,
|
||||||
retry,
|
retry,
|
||||||
supertestWithoutAuth,
|
supertestWithoutAuth,
|
||||||
deployment: DeploymentService,
|
deployment,
|
||||||
randomness: RandomnessService,
|
randomness,
|
||||||
security: SecurityServiceProvider,
|
security,
|
||||||
esDeleteAllIndices: EsDeleteAllIndicesProvider,
|
esDeleteAllIndices,
|
||||||
savedObjectInfo: SavedObjectInfoService,
|
savedObjectInfo,
|
||||||
indexPatterns: IndexPatternsService,
|
indexPatterns,
|
||||||
bsearch: BsearchService,
|
bsearch,
|
||||||
console: ConsoleProvider,
|
console,
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,7 +7,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { GenericFtrProviderContext } from '@kbn/test';
|
import { GenericFtrProviderContext } from '@kbn/test';
|
||||||
import { services } from '../../services';
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
|
import { services as functionalServces } from '../../services';
|
||||||
import { pageObjects } from '../../page_objects';
|
import { pageObjects } from '../../page_objects';
|
||||||
|
|
||||||
|
const services = {
|
||||||
|
...functionalServces,
|
||||||
|
...commonFunctionalServices,
|
||||||
|
};
|
||||||
|
|
||||||
export type FtrProviderContext = GenericFtrProviderContext<typeof services, typeof pageObjects>;
|
export type FtrProviderContext = GenericFtrProviderContext<typeof services, typeof pageObjects>;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services';
|
import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services';
|
||||||
import { services as commonServiceProviders } from '../../common/services';
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
|
|
||||||
import { AppsMenuService } from './apps_menu';
|
import { AppsMenuService } from './apps_menu';
|
||||||
import {
|
import {
|
||||||
|
@ -57,7 +57,7 @@ import { ESQLService } from './esql';
|
||||||
import { DataViewsService } from './data_views';
|
import { DataViewsService } from './data_views';
|
||||||
|
|
||||||
export const services = {
|
export const services = {
|
||||||
...commonServiceProviders,
|
...commonFunctionalServices,
|
||||||
...commonFunctionalUIServices,
|
...commonFunctionalUIServices,
|
||||||
filterBar: FilterBarService,
|
filterBar: FilterBarService,
|
||||||
queryBar: QueryBarService,
|
queryBar: QueryBarService,
|
||||||
|
|
|
@ -6,11 +6,13 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { services as commonServices } from '../../common/services';
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
|
import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services';
|
||||||
|
|
||||||
import { HealthGatewayService } from './health_gateway';
|
import { HealthGatewayService } from './health_gateway';
|
||||||
|
|
||||||
export const services = {
|
export const services = {
|
||||||
...commonServices,
|
...commonFunctionalServices,
|
||||||
|
...commonFunctionalUIServices,
|
||||||
healthGateway: HealthGatewayService,
|
healthGateway: HealthGatewayService,
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,13 +12,15 @@ import {
|
||||||
ElasticsearchSupertestProvider,
|
ElasticsearchSupertestProvider,
|
||||||
} from './services';
|
} from './services';
|
||||||
|
|
||||||
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
|
|
||||||
export default async function ({ readConfigFile }) {
|
export default async function ({ readConfigFile }) {
|
||||||
const commonConfig = await readConfigFile(require.resolve('../common/config'));
|
const commonConfig = await readConfigFile(require.resolve('../common/config'));
|
||||||
const functionalConfig = await readConfigFile(require.resolve('../functional/config.base.js'));
|
const functionalConfig = await readConfigFile(require.resolve('../functional/config.base.js'));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
services: {
|
services: {
|
||||||
...commonConfig.get('services'),
|
...commonFunctionalServices,
|
||||||
supertest: createKibanaSupertestProvider(),
|
supertest: createKibanaSupertestProvider(),
|
||||||
supertestWithoutAuth: KibanaSupertestWithoutAuthProvider,
|
supertestWithoutAuth: KibanaSupertestWithoutAuthProvider,
|
||||||
esSupertest: ElasticsearchSupertestProvider,
|
esSupertest: ElasticsearchSupertestProvider,
|
||||||
|
|
9
test/server_integration/services/types.d.ts
vendored
9
test/server_integration/services/types.d.ts
vendored
|
@ -7,7 +7,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { GenericFtrProviderContext } from '@kbn/test';
|
import { GenericFtrProviderContext } from '@kbn/test';
|
||||||
import { services as kibanaCommonServices } from '../../common/services';
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
|
import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services';
|
||||||
|
|
||||||
|
export const kibanaCommonServices = {
|
||||||
|
...commonFunctionalServices,
|
||||||
|
...commonFunctionalUIServices,
|
||||||
|
} as const;
|
||||||
|
|
||||||
import { services as kibanaApiIntegrationServices } from '../../api_integration/services';
|
import { services as kibanaApiIntegrationServices } from '../../api_integration/services';
|
||||||
|
|
||||||
export type FtrProviderContext = GenericFtrProviderContext<
|
export type FtrProviderContext = GenericFtrProviderContext<
|
||||||
|
|
|
@ -47,8 +47,6 @@
|
||||||
"@kbn/controls-plugin",
|
"@kbn/controls-plugin",
|
||||||
"@kbn/field-formats-plugin",
|
"@kbn/field-formats-plugin",
|
||||||
"@kbn/axe-config",
|
"@kbn/axe-config",
|
||||||
"@kbn/dev-cli-runner",
|
|
||||||
"@kbn/dev-cli-errors",
|
|
||||||
"@kbn/data-view-field-editor-plugin",
|
"@kbn/data-view-field-editor-plugin",
|
||||||
"@kbn/data-views-plugin",
|
"@kbn/data-views-plugin",
|
||||||
"@kbn/guided-onboarding-plugin",
|
"@kbn/guided-onboarding-plugin",
|
||||||
|
@ -71,7 +69,6 @@
|
||||||
"@kbn/links-plugin",
|
"@kbn/links-plugin",
|
||||||
"@kbn/ftr-common-functional-ui-services",
|
"@kbn/ftr-common-functional-ui-services",
|
||||||
"@kbn/monaco",
|
"@kbn/monaco",
|
||||||
"@kbn/search-types",
|
|
||||||
"@kbn/console-plugin",
|
"@kbn/console-plugin",
|
||||||
"@kbn/core-chrome-browser",
|
"@kbn/core-chrome-browser",
|
||||||
"@kbn/default-nav-ml",
|
"@kbn/default-nav-ml",
|
||||||
|
|
|
@ -11,7 +11,7 @@ import expect from '@kbn/expect';
|
||||||
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
|
||||||
import type { IndexDetails } from '@kbn/cloud-security-posture-common';
|
import type { IndexDetails } from '@kbn/cloud-security-posture-common';
|
||||||
import { CLOUD_SECURITY_PLUGIN_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants';
|
import { CLOUD_SECURITY_PLUGIN_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants';
|
||||||
import { SecurityService } from '@kbn/test-suites-src/common/services/security/security';
|
import { SecurityService } from '@kbn/ftr-common-functional-ui-services';
|
||||||
|
|
||||||
export interface RoleCredentials {
|
export interface RoleCredentials {
|
||||||
apiKey: { id: string; name: string };
|
apiKey: { id: string; name: string };
|
||||||
|
|
|
@ -25,7 +25,7 @@ import {
|
||||||
ELASTIC_HTTP_VERSION_HEADER,
|
ELASTIC_HTTP_VERSION_HEADER,
|
||||||
X_ELASTIC_INTERNAL_ORIGIN_REQUEST,
|
X_ELASTIC_INTERNAL_ORIGIN_REQUEST,
|
||||||
} from '@kbn/core-http-common';
|
} from '@kbn/core-http-common';
|
||||||
import type { SecurityService } from '@kbn/test-suites-src/common/services/security/security';
|
import type { SecurityService } from '@kbn/ftr-common-functional-ui-services';
|
||||||
import basicClusterFixture from './fixtures/basiccluster.json';
|
import basicClusterFixture from './fixtures/basiccluster.json';
|
||||||
import multiClusterFixture from './fixtures/multicluster.json';
|
import multiClusterFixture from './fixtures/multicluster.json';
|
||||||
import type { FtrProviderContext } from '../../ftr_provider_context';
|
import type { FtrProviderContext } from '../../ftr_provider_context';
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// NOTE: This is pretty much a copy/paste from test/common/services/bsearch.ts but with the ability
|
// NOTE: This is pretty much a copy/paste from packages/kbn-ftr-common-functional-services/services/bsearch.ts
|
||||||
// to provide custom auth
|
// but with the ability to provide custom auth
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
import request from 'superagent';
|
import request from 'superagent';
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { services as kibanaApiIntegrationServices } from '@kbn/test-suites-src/api_integration/services';
|
import { services as kibanaApiIntegrationServices } from '@kbn/test-suites-src/api_integration/services';
|
||||||
import { services as kibanaCommonServices } from '@kbn/test-suites-src/common/services';
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
|
import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services';
|
||||||
import { InfraLogViewsServiceProvider } from './infra_log_views';
|
import { InfraLogViewsServiceProvider } from './infra_log_views';
|
||||||
import { SpacesServiceProvider } from './spaces';
|
import { SpacesServiceProvider } from './spaces';
|
||||||
import { BsearchSecureService } from './bsearch_secure';
|
import { BsearchSecureService } from './bsearch_secure';
|
||||||
|
@ -14,7 +15,8 @@ import { ApmSynthtraceKibanaClientProvider } from './apm_synthtrace_kibana_clien
|
||||||
import { InfraSynthtraceKibanaClientProvider } from './infra_synthtrace_kibana_client';
|
import { InfraSynthtraceKibanaClientProvider } from './infra_synthtrace_kibana_client';
|
||||||
|
|
||||||
export const services = {
|
export const services = {
|
||||||
...kibanaCommonServices,
|
...commonFunctionalServices,
|
||||||
|
...commonFunctionalUIServices,
|
||||||
infraLogViews: InfraLogViewsServiceProvider,
|
infraLogViews: InfraLogViewsServiceProvider,
|
||||||
supertest: kibanaApiIntegrationServices.supertest,
|
supertest: kibanaApiIntegrationServices.supertest,
|
||||||
spaces: SpacesServiceProvider,
|
spaces: SpacesServiceProvider,
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { SecurityService } from '@kbn/test-suites-src/common/services/security/security';
|
import type { SecurityService } from '@kbn/ftr-common-functional-ui-services';
|
||||||
|
|
||||||
export const testUsers: {
|
export const testUsers: {
|
||||||
[rollName: string]: { username: string; password: string; permissions?: any };
|
[rollName: string]: { username: string; password: string; permissions?: any };
|
||||||
|
|
|
@ -4,5 +4,10 @@
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
|
import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services';
|
||||||
|
|
||||||
export * from '@kbn/test-suites-src/common/services';
|
export const services = {
|
||||||
|
...commonFunctionalServices,
|
||||||
|
...commonFunctionalUIServices,
|
||||||
|
} as const;
|
||||||
|
|
|
@ -5,4 +5,10 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from '@kbn/test-suites-src/common/services';
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
|
import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services';
|
||||||
|
|
||||||
|
export const services = {
|
||||||
|
...commonFunctionalServices,
|
||||||
|
...commonFunctionalUIServices,
|
||||||
|
} as const;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
import { difference, union } from 'lodash';
|
import { difference, union } from 'lodash';
|
||||||
import { SecurityService } from '@kbn/test-suites-src/common/services/security/security';
|
import type { SecurityService } from '@kbn/ftr-common-functional-ui-services';
|
||||||
import { Elasticsearch, Kibana } from '..';
|
import { Elasticsearch, Kibana } from '..';
|
||||||
import { callKibana, isAxiosError } from './call_kibana';
|
import { callKibana, isAxiosError } from './call_kibana';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import { asyncForEach } from '@kbn/std';
|
import { asyncForEach } from '@kbn/std';
|
||||||
import { SecurityService } from '@kbn/test-suites-src/common/services/security/security';
|
import type { SecurityService } from '@kbn/ftr-common-functional-ui-services';
|
||||||
import { ProfilingUsername, profilingUsers } from './authentication';
|
import { ProfilingUsername, profilingUsers } from './authentication';
|
||||||
import { AbortError, callKibana } from './helpers/call_kibana';
|
import { AbortError, callKibana } from './helpers/call_kibana';
|
||||||
import { createOrUpdateUser } from './helpers/create_or_update_user';
|
import { createOrUpdateUser } from './helpers/create_or_update_user';
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FtrConfigProviderContext } from '@kbn/test';
|
import { FtrConfigProviderContext } from '@kbn/test';
|
||||||
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
|
|
||||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||||
const kibanaCommonTestsConfig = await readConfigFile(
|
const kibanaCommonTestsConfig = await readConfigFile(
|
||||||
|
@ -15,6 +16,10 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||||
return {
|
return {
|
||||||
...kibanaCommonTestsConfig.getAll(),
|
...kibanaCommonTestsConfig.getAll(),
|
||||||
|
|
||||||
|
services: {
|
||||||
|
...commonFunctionalServices,
|
||||||
|
},
|
||||||
|
|
||||||
testFiles: [require.resolve('./test')],
|
testFiles: [require.resolve('./test')],
|
||||||
|
|
||||||
esTestCluster: {
|
esTestCluster: {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import supertest from 'supertest';
|
||||||
import { format as formatUrl } from 'url';
|
import { format as formatUrl } from 'url';
|
||||||
import { IEsSearchResponse } from '@kbn/search-types';
|
import { IEsSearchResponse } from '@kbn/search-types';
|
||||||
import { RoleCredentials } from '@kbn/test-suites-serverless/shared/services';
|
import { RoleCredentials } from '@kbn/test-suites-serverless/shared/services';
|
||||||
import type { SendOptions } from '@kbn/test-suites-src/common/services/bsearch';
|
import type { SendOptions } from '@kbn/ftr-common-functional-services';
|
||||||
import type { SendOptions as SecureBsearchSendOptions } from '@kbn/test-suites-serverless/shared/services/bsearch_secure';
|
import type { SendOptions as SecureBsearchSendOptions } from '@kbn/test-suites-serverless/shared/services/bsearch_secure';
|
||||||
import type { FtrProviderContext } from '../../ftr_provider_context';
|
import type { FtrProviderContext } from '../../ftr_provider_context';
|
||||||
import type { SecuritySolutionUtilsInterface } from './types';
|
import type { SecuritySolutionUtilsInterface } from './types';
|
||||||
|
|
|
@ -9,7 +9,7 @@ import TestAgent from 'supertest/lib/agent';
|
||||||
import type { IEsSearchResponse } from '@kbn/search-types';
|
import type { IEsSearchResponse } from '@kbn/search-types';
|
||||||
|
|
||||||
import type { BsearchSecureService } from '@kbn/test-suites-serverless/shared/services/bsearch_secure';
|
import type { BsearchSecureService } from '@kbn/test-suites-serverless/shared/services/bsearch_secure';
|
||||||
import type { BsearchService, SendOptions } from '@kbn/test-suites-src/common/services/bsearch';
|
import type { BsearchService, SendOptions } from '@kbn/ftr-common-functional-services';
|
||||||
|
|
||||||
export interface SecuritySolutionServerlessBsearch extends Omit<BsearchSecureService, 'send'> {
|
export interface SecuritySolutionServerlessBsearch extends Omit<BsearchSecureService, 'send'> {
|
||||||
send: <T extends IEsSearchResponse>(options: SendOptions) => Promise<T>;
|
send: <T extends IEsSearchResponse>(options: SendOptions) => Promise<T>;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { SecurityService } from '@kbn/test-suites-src/common/services/security/security';
|
import type { SecurityService } from '@kbn/ftr-common-functional-ui-services';
|
||||||
|
|
||||||
export const usersAndRolesFactory = (security: SecurityService) => ({
|
export const usersAndRolesFactory = (security: SecurityService) => ({
|
||||||
createRole: async ({ name, privileges }: { name: string; privileges: any }) => {
|
createRole: async ({ name, privileges }: { name: string; privileges: any }) => {
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
HostsQueries,
|
HostsQueries,
|
||||||
} from '@kbn/security-solution-plugin/common/search_strategy';
|
} from '@kbn/security-solution-plugin/common/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
import { hostDetailsFilebeatExpectedResult } from '../mocks/host_details';
|
import { hostDetailsFilebeatExpectedResult } from '../mocks/host_details';
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ import {
|
||||||
FirstLastSeenStrategyResponse,
|
FirstLastSeenStrategyResponse,
|
||||||
} from '@kbn/security-solution-plugin/common/search_strategy';
|
} from '@kbn/security-solution-plugin/common/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
|
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import {
|
||||||
HostsUncommonProcessesStrategyResponse,
|
HostsUncommonProcessesStrategyResponse,
|
||||||
} from '@kbn/security-solution-plugin/common/search_strategy';
|
} from '@kbn/security-solution-plugin/common/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
|
|
||||||
const FROM = '2000-01-01T00:00:00.000Z';
|
const FROM = '2000-01-01T00:00:00.000Z';
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
NetworkQueries,
|
NetworkQueries,
|
||||||
} from '@kbn/security-solution-plugin/common/search_strategy';
|
} from '@kbn/security-solution-plugin/common/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
|
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import {
|
||||||
NetworkDnsStrategyResponse,
|
NetworkDnsStrategyResponse,
|
||||||
} from '@kbn/security-solution-plugin/common/search_strategy';
|
} from '@kbn/security-solution-plugin/common/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
|
|
||||||
export default function ({ getService }: FtrProviderContextWithSpaces) {
|
export default function ({ getService }: FtrProviderContextWithSpaces) {
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
NetworkTopNFlowStrategyResponse,
|
NetworkTopNFlowStrategyResponse,
|
||||||
} from '@kbn/security-solution-plugin/common/search_strategy';
|
} from '@kbn/security-solution-plugin/common/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
|
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,8 @@ import {
|
||||||
NetworkTlsStrategyResponse,
|
NetworkTlsStrategyResponse,
|
||||||
} from '@kbn/security-solution-plugin/common/search_strategy';
|
} from '@kbn/security-solution-plugin/common/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
|
||||||
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
|
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import {
|
||||||
HostsOverviewStrategyResponse,
|
HostsOverviewStrategyResponse,
|
||||||
} from '@kbn/security-solution-plugin/common/search_strategy';
|
} from '@kbn/security-solution-plugin/common/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
|
|
||||||
export default function ({ getService }: FtrProviderContextWithSpaces) {
|
export default function ({ getService }: FtrProviderContextWithSpaces) {
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
NetworkQueries,
|
NetworkQueries,
|
||||||
} from '@kbn/security-solution-plugin/common/search_strategy';
|
} from '@kbn/security-solution-plugin/common/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
|
|
||||||
export default function ({ getService }: FtrProviderContextWithSpaces) {
|
export default function ({ getService }: FtrProviderContextWithSpaces) {
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
import type { UserAuthenticationsRequestOptions } from '@kbn/security-solution-plugin/common/api/search_strategy';
|
import type { UserAuthenticationsRequestOptions } from '@kbn/security-solution-plugin/common/api/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
|
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
|
|
||||||
const FROM = '2000-01-01T00:00:00.000Z';
|
const FROM = '2000-01-01T00:00:00.000Z';
|
||||||
|
|
|
@ -14,7 +14,8 @@ import {
|
||||||
NetworkUsersStrategyResponse,
|
NetworkUsersStrategyResponse,
|
||||||
} from '@kbn/security-solution-plugin/common/search_strategy';
|
} from '@kbn/security-solution-plugin/common/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
|
||||||
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
|
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,9 @@ import {
|
||||||
TimelineEventsAllStrategyResponse,
|
TimelineEventsAllStrategyResponse,
|
||||||
} from '@kbn/security-solution-plugin/common/search_strategy';
|
} from '@kbn/security-solution-plugin/common/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
|
|
||||||
import { getFieldsToRequest, getFilterValue } from '../../../../utils';
|
import { getFieldsToRequest, getFilterValue } from '../../../../utils';
|
||||||
|
|
||||||
const TO = '3000-01-01T00:00:00.000Z';
|
const TO = '3000-01-01T00:00:00.000Z';
|
||||||
|
|
|
@ -13,7 +13,8 @@ import {
|
||||||
TimelineKpiStrategyResponse,
|
TimelineKpiStrategyResponse,
|
||||||
} from '@kbn/security-solution-plugin/common/search_strategy';
|
} from '@kbn/security-solution-plugin/common/search_strategy';
|
||||||
import TestAgent from 'supertest/lib/agent';
|
import TestAgent from 'supertest/lib/agent';
|
||||||
import { BsearchService } from '@kbn/test-suites-src/common/services/bsearch';
|
|
||||||
|
import { BsearchService } from '@kbn/ftr-common-functional-services';
|
||||||
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
import { FtrProviderContextWithSpaces } from '../../../../../ftr_provider_context_with_spaces';
|
||||||
import { timelineDetailsFilebeatExpectedResults as EXPECTED_DATA } from '../mocks/timeline_details';
|
import { timelineDetailsFilebeatExpectedResults as EXPECTED_DATA } from '../mocks/timeline_details';
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,6 @@
|
||||||
"@kbn/dev-cli-runner",
|
"@kbn/dev-cli-runner",
|
||||||
"@kbn/search-types",
|
"@kbn/search-types",
|
||||||
"@kbn/security-plugin",
|
"@kbn/security-plugin",
|
||||||
"@kbn/test-suites-src",
|
"@kbn/ftr-common-functional-ui-services",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FtrConfigProviderContext } from '@kbn/test';
|
import { FtrConfigProviderContext } from '@kbn/test';
|
||||||
|
|
||||||
import { CA_CERT_PATH } from '@kbn/dev-utils';
|
import { CA_CERT_PATH } from '@kbn/dev-utils';
|
||||||
|
import { services } from './services';
|
||||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||||
const kibanaCommonTestsConfig = await readConfigFile(
|
const kibanaCommonTestsConfig = await readConfigFile(
|
||||||
require.resolve('@kbn/test-suites-src/common/config')
|
require.resolve('@kbn/test-suites-src/common/config')
|
||||||
|
@ -20,6 +19,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||||
return {
|
return {
|
||||||
...kibanaCommonTestsConfig.getAll(),
|
...kibanaCommonTestsConfig.getAll(),
|
||||||
|
|
||||||
|
services,
|
||||||
|
|
||||||
esTestCluster: {
|
esTestCluster: {
|
||||||
...xpackFunctionalTestsConfig.get('esTestCluster'),
|
...xpackFunctionalTestsConfig.get('esTestCluster'),
|
||||||
serverArgs: [
|
serverArgs: [
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { commonFunctionalServices } from '@kbn/ftr-common-functional-services';
|
||||||
|
|
||||||
export default async function ({ readConfigFile }) {
|
export default async function ({ readConfigFile }) {
|
||||||
// Read the Kibana API integration tests config file so that we can utilize its services.
|
// Read the Kibana API integration tests config file so that we can utilize its services.
|
||||||
const kibanaAPITestsConfig = await readConfigFile(
|
const kibanaAPITestsConfig = await readConfigFile(
|
||||||
|
@ -13,15 +15,12 @@ export default async function ({ readConfigFile }) {
|
||||||
const xPackFunctionalTestsConfig = await readConfigFile(
|
const xPackFunctionalTestsConfig = await readConfigFile(
|
||||||
require.resolve('../functional/config.base.js')
|
require.resolve('../functional/config.base.js')
|
||||||
);
|
);
|
||||||
const kibanaCommonConfig = await readConfigFile(
|
|
||||||
require.resolve('@kbn/test-suites-src/common/config')
|
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
testFiles: [require.resolve('./upgrade_assistant')],
|
testFiles: [require.resolve('./upgrade_assistant')],
|
||||||
servers: xPackFunctionalTestsConfig.get('servers'),
|
servers: xPackFunctionalTestsConfig.get('servers'),
|
||||||
services: {
|
services: {
|
||||||
...kibanaCommonConfig.get('services'),
|
...commonFunctionalServices,
|
||||||
supertest: kibanaAPITestsConfig.get('services.supertest'),
|
supertest: kibanaAPITestsConfig.get('services.supertest'),
|
||||||
},
|
},
|
||||||
junit: {
|
junit: {
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { InternalRequestHeader, RoleCredentials } from '../../../../shared/servi
|
||||||
|
|
||||||
export default ({ getService }: FtrProviderContext) => {
|
export default ({ getService }: FtrProviderContext) => {
|
||||||
const svlCommonApi = getService('svlCommonApi');
|
const svlCommonApi = getService('svlCommonApi');
|
||||||
const consoleService = getService('console');
|
const console = getService('console');
|
||||||
|
|
||||||
const svlUserManager = getService('svlUserManager');
|
const svlUserManager = getService('svlUserManager');
|
||||||
const supertestWithoutAuth = getService('supertestWithoutAuth');
|
const supertestWithoutAuth = getService('supertestWithoutAuth');
|
||||||
|
@ -27,17 +27,6 @@ export default ({ getService }: FtrProviderContext) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('/api/console/autocomplete_entities', function () {
|
describe('/api/console/autocomplete_entities', function () {
|
||||||
let createIndex: (typeof consoleService)['helpers']['createIndex'];
|
|
||||||
let createAlias: (typeof consoleService)['helpers']['createAlias'];
|
|
||||||
let createIndexTemplate: (typeof consoleService)['helpers']['createIndexTemplate'];
|
|
||||||
let createComponentTemplate: (typeof consoleService)['helpers']['createComponentTemplate'];
|
|
||||||
let createDataStream: (typeof consoleService)['helpers']['createDataStream'];
|
|
||||||
let deleteIndex: (typeof consoleService)['helpers']['deleteIndex'];
|
|
||||||
let deleteAlias: (typeof consoleService)['helpers']['deleteAlias'];
|
|
||||||
let deleteIndexTemplate: (typeof consoleService)['helpers']['deleteIndexTemplate'];
|
|
||||||
let deleteComponentTemplate: (typeof consoleService)['helpers']['deleteComponentTemplate'];
|
|
||||||
let deleteDataStream: (typeof consoleService)['helpers']['deleteDataStream'];
|
|
||||||
|
|
||||||
const indexName = 'test-index-1';
|
const indexName = 'test-index-1';
|
||||||
const aliasName = 'test-alias-1';
|
const aliasName = 'test-alias-1';
|
||||||
const indexTemplateName = 'test-index-template-1';
|
const indexTemplateName = 'test-index-template-1';
|
||||||
|
@ -47,36 +36,26 @@ export default ({ getService }: FtrProviderContext) => {
|
||||||
before(async () => {
|
before(async () => {
|
||||||
roleAuthc = await svlUserManager.createM2mApiKeyWithRoleScope('admin');
|
roleAuthc = await svlUserManager.createM2mApiKeyWithRoleScope('admin');
|
||||||
internalRequestHeader = svlCommonApi.getInternalRequestHeader();
|
internalRequestHeader = svlCommonApi.getInternalRequestHeader();
|
||||||
({
|
|
||||||
helpers: {
|
|
||||||
createIndex,
|
|
||||||
createAlias,
|
|
||||||
createIndexTemplate,
|
|
||||||
createComponentTemplate,
|
|
||||||
createDataStream,
|
|
||||||
deleteIndex,
|
|
||||||
deleteAlias,
|
|
||||||
deleteIndexTemplate,
|
|
||||||
deleteComponentTemplate,
|
|
||||||
deleteDataStream,
|
|
||||||
},
|
|
||||||
} = consoleService);
|
|
||||||
|
|
||||||
// Setup indices, aliases, templates, and data streams
|
// Setup indices, aliases, templates, and data streams
|
||||||
await createIndex(indexName);
|
await console.createIndex(indexName);
|
||||||
await createAlias(indexName, aliasName);
|
await console.createAlias(indexName, aliasName);
|
||||||
await createComponentTemplate(componentTemplateName);
|
await console.createComponentTemplate(componentTemplateName);
|
||||||
await createIndexTemplate(indexTemplateName, [dataStreamName], [componentTemplateName]);
|
await console.createIndexTemplate(
|
||||||
await createDataStream(dataStreamName);
|
indexTemplateName,
|
||||||
|
[dataStreamName],
|
||||||
|
[componentTemplateName]
|
||||||
|
);
|
||||||
|
await console.createDataStream(dataStreamName);
|
||||||
});
|
});
|
||||||
|
|
||||||
after(async () => {
|
after(async () => {
|
||||||
// Cleanup indices, aliases, templates, and data streams
|
// Cleanup indices, aliases, templates, and data streams
|
||||||
await deleteAlias(indexName, aliasName);
|
await console.deleteAlias(indexName, aliasName);
|
||||||
await deleteIndex(indexName);
|
await console.deleteIndex(indexName);
|
||||||
await deleteDataStream(dataStreamName);
|
await console.deleteDataStream(dataStreamName);
|
||||||
await deleteIndexTemplate(indexTemplateName);
|
await console.deleteIndexTemplate(indexTemplateName);
|
||||||
await deleteComponentTemplate(componentTemplateName);
|
await console.deleteComponentTemplate(componentTemplateName);
|
||||||
|
|
||||||
await svlUserManager.invalidateM2mApiKeyWithRoleScope(roleAuthc);
|
await svlUserManager.invalidateM2mApiKeyWithRoleScope(roleAuthc);
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// NOTE: This is pretty much a copy/paste from test/common/services/bsearch.ts but with the ability
|
// NOTE: This is pretty much a copy/paste from packages/kbn-ftr-common-functional-services/services/bsearch.ts
|
||||||
// to provide custom auth
|
// but with the ability to provide custom auth
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
import { GenericFtrService } from '@kbn/test';
|
import { GenericFtrService } from '@kbn/test';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue