mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
(cherry picked from commit 68130f7037
)
Co-authored-by: Sander Philipse <94373878+sphilipse@users.noreply.github.com>
This commit is contained in:
parent
5d002bd133
commit
57d4764899
2 changed files with 12 additions and 10 deletions
|
@ -63,7 +63,7 @@ describe('Setup Indices', () => {
|
|||
},
|
||||
properties: {
|
||||
completed_at: { type: 'date' },
|
||||
connector: connectorsMappings.properties,
|
||||
connector: { properties: connectorsMappings.properties },
|
||||
connector_id: {
|
||||
type: 'keyword',
|
||||
},
|
||||
|
@ -157,7 +157,7 @@ describe('Setup Indices', () => {
|
|||
expect(mockClient.asCurrentUser.indices.create).toHaveBeenCalledWith({
|
||||
index: connectorsIndexName,
|
||||
mappings: connectorsMappings,
|
||||
settings: { hidden: true },
|
||||
settings: { auto_expand_replicas: '0-3', hidden: true, number_of_replicas: 0 },
|
||||
});
|
||||
expect(mockClient.asCurrentUser.indices.updateAliases).toHaveBeenCalledWith({
|
||||
actions: [
|
||||
|
@ -191,7 +191,7 @@ describe('Setup Indices', () => {
|
|||
expect(mockClient.asCurrentUser.indices.create).toHaveBeenCalledWith({
|
||||
index: jobsIndexName,
|
||||
mappings: connectorsJobsMappings,
|
||||
settings: { hidden: true },
|
||||
settings: { auto_expand_replicas: '0-3', hidden: true, number_of_replicas: 0 },
|
||||
});
|
||||
expect(mockClient.asCurrentUser.indices.updateAliases).toHaveBeenCalledWith({
|
||||
actions: [
|
||||
|
|
|
@ -53,6 +53,12 @@ const connectorMappingsProperties: Record<string, MappingProperty> = {
|
|||
sync_now: { type: 'boolean' },
|
||||
};
|
||||
|
||||
const defaultSettings: IndicesIndexSettings = {
|
||||
auto_expand_replicas: '0-3',
|
||||
hidden: true,
|
||||
number_of_replicas: 0,
|
||||
};
|
||||
|
||||
const indices: IndexDefinition[] = [
|
||||
{
|
||||
aliases: ['.elastic-connectors'],
|
||||
|
@ -63,9 +69,7 @@ const indices: IndexDefinition[] = [
|
|||
properties: connectorMappingsProperties,
|
||||
},
|
||||
name: '.elastic-connectors-v1',
|
||||
settings: {
|
||||
hidden: true,
|
||||
},
|
||||
settings: defaultSettings,
|
||||
},
|
||||
{
|
||||
aliases: ['.elastic-connectors-sync-jobs'],
|
||||
|
@ -75,7 +79,7 @@ const indices: IndexDefinition[] = [
|
|||
},
|
||||
properties: {
|
||||
completed_at: { type: 'date' },
|
||||
connector: connectorMappingsProperties,
|
||||
connector: { properties: connectorMappingsProperties },
|
||||
connector_id: {
|
||||
type: 'keyword',
|
||||
},
|
||||
|
@ -92,9 +96,7 @@ const indices: IndexDefinition[] = [
|
|||
},
|
||||
},
|
||||
name: '.elastic-connectors-sync-jobs-v1',
|
||||
settings: {
|
||||
hidden: true,
|
||||
},
|
||||
settings: defaultSettings,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue