Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('updateDataStreams', () => {
});
expect(esClient.indices.putMapping).toHaveBeenCalledWith({
index: dataStreamName,
body: simulateIndexTemplateResponse.template.mappings,
...simulateIndexTemplateResponse.template.mappings,
});
});

Expand Down Expand Up @@ -167,7 +167,7 @@ describe('createOrUpdateDataStream', () => {
});
expect(esClient.indices.putMapping).toHaveBeenCalledWith({
index: name,
body: simulateIndexTemplateResponse.template.mappings,
...simulateIndexTemplateResponse.template.mappings,
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ const updateMapping = async ({ logger, esClient, indexName, writeIndexOnly }: Up
() =>
esClient.indices.putMapping({
index: indexName,
// @ts-expect-error elasticsearch@9.0.0 https://github.com/elastic/elasticsearch-js/issues/2584
body: simulatedMapping,
...simulatedMapping,
write_index_only: writeIndexOnly,
}),
{ logger }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('updateIndices', () => {
});
expect(esClient.indices.putMapping).toHaveBeenCalledWith({
index: indexName,
body: simulateIndexTemplateResponse.template.mappings,
...simulateIndexTemplateResponse.template.mappings,
});
});

Expand Down Expand Up @@ -158,7 +158,7 @@ describe('createOrUpdateIndex', () => {
});
expect(esClient.indices.putMapping).toHaveBeenCalledWith({
index: name,
body: simulateIndexTemplateResponse.template.mappings,
...simulateIndexTemplateResponse.template.mappings,
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ const updateMapping = async ({ logger, esClient, indexName, writeIndexOnly }: Up
() =>
esClient.indices.putMapping({
index: indexName,
// @ts-expect-error elasticsearch@9.0.0 https://github.com/elastic/elasticsearch-js/issues/2584
body: simulatedMapping,
...simulatedMapping,
write_index_only: writeIndexOnly,
}),
{ logger }
Expand Down