2019-12-16 17:36:42 +01:00
|
|
|
/*
|
|
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
2021-02-04 03:12:39 +01:00
|
|
|
* 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.
|
2019-12-16 17:36:42 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
import { ActionsConfigurationUtilities } from './actions_config';
|
|
|
|
|
2020-03-20 15:49:37 +01:00
|
|
|
const createActionsConfigMock = () => {
|
|
|
|
const mocked: jest.Mocked<ActionsConfigurationUtilities> = {
|
2020-08-25 01:25:05 +02:00
|
|
|
isHostnameAllowed: jest.fn().mockReturnValue(true),
|
|
|
|
isUriAllowed: jest.fn().mockReturnValue(true),
|
2020-03-20 15:49:37 +01:00
|
|
|
isActionTypeEnabled: jest.fn().mockReturnValue(true),
|
2020-08-25 01:25:05 +02:00
|
|
|
ensureHostnameAllowed: jest.fn().mockReturnValue({}),
|
|
|
|
ensureUriAllowed: jest.fn().mockReturnValue({}),
|
2020-03-20 15:49:37 +01:00
|
|
|
ensureActionTypeEnabled: jest.fn().mockReturnValue({}),
|
2021-06-23 20:37:31 +02:00
|
|
|
getSSLSettings: jest.fn().mockReturnValue({
|
2021-05-27 23:20:57 +02:00
|
|
|
verificationMode: 'full',
|
|
|
|
}),
|
2021-01-28 19:44:25 +01:00
|
|
|
getProxySettings: jest.fn().mockReturnValue(undefined),
|
2021-04-08 00:06:44 +02:00
|
|
|
getResponseSettings: jest.fn().mockReturnValue({
|
|
|
|
maxContentLength: 1000000,
|
|
|
|
timeout: 360000,
|
|
|
|
}),
|
2021-04-28 21:26:47 +02:00
|
|
|
getCustomHostSettings: jest.fn().mockReturnValue(undefined),
|
2020-03-20 15:49:37 +01:00
|
|
|
};
|
|
|
|
return mocked;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const actionsConfigMock = {
|
|
|
|
create: createActionsConfigMock,
|
2019-12-16 17:36:42 +01:00
|
|
|
};
|