kibana/x-pack/mocks.ts
Mikhail Shustov 4040c3090b
Mark elasticsearch client exposed via request context as deprecated (#67319)
* add legacy prefix for es client exposed via request handler context

* update src/plugins

* update core mocks and tests

* update test plugins

* update xpack plugins

* include x-pack/mocks.ts

* update after master merge

* update docs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-27 19:00:16 +02:00

19 lines
638 B
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { coreMock } from '../src/core/server/mocks';
import { licensingMock } from './plugins/licensing/server/mocks';
function createCoreRequestHandlerContextMock() {
return {
core: coreMock.createRequestHandlerContext(),
licensing: { license: licensingMock.createLicense() },
};
}
export const xpackMocks = {
createRequestHandlerContext: createCoreRequestHandlerContextMock,
};