Skip to content

Commit

Permalink
added missing index_mode field to package archive parse logic
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaElastic committed Nov 15, 2022
1 parent 5646bf5 commit fc64c1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ describe('parseDataStreamElasticsearchEntry', () => {
source_mode: 'synthetic',
});
});
it('Should add index_mode', () => {
expect(parseDataStreamElasticsearchEntry({ index_mode: 'time_series' })).toEqual({
index_mode: 'time_series',
});
});
it('Should add index_template mappings and expand dots', () => {
expect(
parseDataStreamElasticsearchEntry({
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/fleet/server/services/epm/archive/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ export function parseDataStreamElasticsearchEntry(
);
}

if (expandedElasticsearch?.index_mode) {
parsedElasticsearchEntry.index_mode = expandedElasticsearch.index_mode;
}

return parsedElasticsearchEntry;
}

Expand Down

0 comments on commit fc64c1b

Please sign in to comment.