Skip to content

Commit

Permalink
80697: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
nnamdifrankie committed Oct 16, 2020
1 parent 4d26d4a commit 614a2f0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { Logger } from 'src/core/server';
import * as Registry from '../../registry';
import { appContextService } from '../../../app_context';

export const getAsset = (path: string): Buffer => {
return Registry.getAsset(path);
};

export const getLogger = (): Logger => {
return appContextService.getLogger();
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { SavedObjectsClientContract } from 'kibana/server';
import { CallESAsCurrentUser, ElasticsearchAssetType, EsAssetReference } from '../../../../types';
import { PACKAGES_SAVED_OBJECT_TYPE } from '../../../../../common/constants';
import { getLogger } from './common';
import { appContextService } from '../../../app_context';

export const stopTransforms = async (transformIds: string[], callCluster: CallESAsCurrentUser) => {
for (const transformId of transformIds) {
Expand Down Expand Up @@ -58,7 +59,7 @@ export const deleteTransforms = async (
});
}
} else {
getLogger().warn(`cannot find transform for ${transformId}`);
appContextService.getLogger().warn(`cannot find transform for ${transformId}`);
}
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jest.mock('../../packages/get', () => {
jest.mock('./common', () => {
return {
getAsset: jest.fn(),
getLogger: jest.fn(),
};
});

Expand Down

0 comments on commit 614a2f0

Please sign in to comment.