Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.5] [ML] Fix bug with fields.yml not defined, add jest tests for new transform installation mechanism in Fleet (#142159) #142754

Merged
merged 1 commit into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,10 @@ const installTransformsAssets = async (
await Promise.all(
destinationIndexTemplates
.map((destinationIndexTemplate) => {
const customMappings = transformsSpecifications
.get(destinationIndexTemplate.transformModuleId)
?.get('mappings');
const customMappings =
transformsSpecifications
.get(destinationIndexTemplate.transformModuleId)
?.get('mappings') ?? {};
const registryElasticsearch: RegistryElasticsearch = {
'index_template.settings': destinationIndexTemplate.template.settings,
'index_template.mappings': destinationIndexTemplate.template.mappings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { PACKAGES_SAVED_OBJECT_TYPE } from '../../../../constants';
import { getAsset } from './common';
import { installTransforms } from './install';

describe('test transform install', () => {
describe('test transform install with legacy schema', () => {
let esClient: ReturnType<typeof elasticsearchClientMock.createElasticsearchClient>;
let savedObjectsClient: jest.Mocked<SavedObjectsClientContract>;
beforeEach(() => {
Expand Down
Loading