Skip to content

Commit

Permalink
Fix ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dasansol92 committed Dec 16, 2021
1 parent 769f286 commit 4bdb86a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ import {
} from '@kbn/securitysolution-list-constants';
import { KbnClient } from '@kbn/test';
import { AxiosError, AxiosResponse } from 'axios';
import { indexFleetEndpointPolicy } from '../../../common/endpoint/data_loaders/index_fleet_endpoint_policy';
import {
PACKAGE_POLICY_API_ROUTES,
PACKAGE_POLICY_SAVED_OBJECT_TYPE,
} from '../../../../fleet/common/constants';
import { HostIsolationExceptionGenerator } from '../../../common/endpoint/data_generators/host_isolation_exception_generator';
import { setupFleetForEndpoint } from '../../../common/endpoint/data_loaders/setup_fleet_for_endpoint';
import { GetPolicyListResponse } from '../../../public/management/pages/policy/types';
import { randomPolicyIdGenerator } from '../common/random_policy_id_generator';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { ToolingLog } from '@kbn/dev-utils';
import { KbnClient } from '@kbn/test';
import pMap from 'p-map';
import { basename } from 'path';
import { AxiosResponse } from 'axios';
import {
ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION,
ENDPOINT_TRUSTED_APPS_LIST_ID,
Expand All @@ -21,13 +20,7 @@ import {
import { CreateExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types';
import { TrustedApp } from '../../../common/endpoint/types';
import { TrustedAppGenerator } from '../../../common/endpoint/data_generators/trusted_app_generator';
import { indexFleetEndpointPolicy } from '../../../common/endpoint/data_loaders/index_fleet_endpoint_policy';
import { setupFleetForEndpoint } from '../../../common/endpoint/data_loaders/setup_fleet_for_endpoint';
import { GetPolicyListResponse } from '../../../public/management/pages/policy/types';
import {
PACKAGE_POLICY_API_ROUTES,
PACKAGE_POLICY_SAVED_OBJECT_TYPE,
} from '../../../../fleet/common';

import { newTrustedAppToCreateExceptionListItem } from '../../../public/management/pages/trusted_apps/service/mappers';
import { randomPolicyIdGenerator } from '../common/random_policy_id_generator';

Expand Down Expand Up @@ -144,19 +137,6 @@ const createRunLogger = () => {
});
};

const fetchEndpointPolicies = (
kbnClient: KbnClient
): Promise<AxiosResponse<GetPolicyListResponse>> => {
return kbnClient.request<GetPolicyListResponse>({
method: 'GET',
path: PACKAGE_POLICY_API_ROUTES.LIST_PATTERN,
query: {
perPage: 100,
kuery: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name: endpoint`,
},
});
};

const ensureCreateEndpointTrustedAppsList = async (kbn: KbnClient) => {
const newListDefinition: CreateExceptionListSchema = {
description: ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION,
Expand Down

0 comments on commit 4bdb86a

Please sign in to comment.