kibana/x-pack/plugins/actions/server/actions_config.mock.ts
ymao1 874dfc62f4
[Actions] Rename tls.* configs to ssl.* (#102902)
* Changing tls to ssl

* Changing tls to ssl

* Updating docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-23 14:37:31 -04:00

34 lines
1.2 KiB
TypeScript

/*
* 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { ActionsConfigurationUtilities } from './actions_config';
const createActionsConfigMock = () => {
const mocked: jest.Mocked<ActionsConfigurationUtilities> = {
isHostnameAllowed: jest.fn().mockReturnValue(true),
isUriAllowed: jest.fn().mockReturnValue(true),
isActionTypeEnabled: jest.fn().mockReturnValue(true),
ensureHostnameAllowed: jest.fn().mockReturnValue({}),
ensureUriAllowed: jest.fn().mockReturnValue({}),
ensureActionTypeEnabled: jest.fn().mockReturnValue({}),
getSSLSettings: jest.fn().mockReturnValue({
verificationMode: 'full',
}),
getProxySettings: jest.fn().mockReturnValue(undefined),
getResponseSettings: jest.fn().mockReturnValue({
maxContentLength: 1000000,
timeout: 360000,
}),
getCustomHostSettings: jest.fn().mockReturnValue(undefined),
};
return mocked;
};
export const actionsConfigMock = {
create: createActionsConfigMock,
};