Skip to content

Commit 031e90b

Browse files
Fix tests and accept api changes
1 parent 5cc1b79 commit 031e90b

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternsfetcher.getfieldsforwildcard.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ Get a list of field objects for an index pattern that may contain wildcards
1212
getFieldsForWildcard(options: {
1313
pattern: string | string[];
1414
metaFields?: string[];
15+
fieldCapsOptions?: {
16+
allowNoIndices: boolean;
17+
};
1518
}): Promise<FieldDescriptor[]>;
1619
```
1720

1821
## Parameters
1922

2023
| Parameter | Type | Description |
2124
| --- | --- | --- |
22-
| options | <code>{</code><br/><code> pattern: string &#124; string[];</code><br/><code> metaFields?: string[];</code><br/><code> }</code> | |
25+
| options | <code>{</code><br/><code> pattern: string &#124; string[];</code><br/><code> metaFields?: string[];</code><br/><code> fieldCapsOptions?: {</code><br/><code> allowNoIndices: boolean;</code><br/><code> };</code><br/><code> }</code> | |
2326

2427
<b>Returns:</b>
2528

src/plugins/data/server/index_patterns/fetcher/lib/field_capabilities/field_capabilities.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('index_patterns/field_capabilities/field_capabilities', () => {
6161

6262
await getFieldCapabilities(footballs[0], footballs[1]);
6363
sinon.assert.calledOnce(callFieldCapsApi);
64-
calledWithExactly(callFieldCapsApi, [footballs[0], footballs[1]]);
64+
calledWithExactly(callFieldCapsApi, [footballs[0], footballs[1], undefined]);
6565
});
6666
});
6767

src/plugins/data/server/server.api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,9 @@ export class IndexPatternsFetcher {
687687
getFieldsForWildcard(options: {
688688
pattern: string | string[];
689689
metaFields?: string[];
690+
fieldCapsOptions?: {
691+
allowNoIndices: boolean;
692+
};
690693
}): Promise<IndexPatternFieldDescriptor[]>;
691694
}
692695

src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ describe('AbstractSearchStrategy', () => {
6565
expect(fields).toBe(mockedFields);
6666
expect(req.pre.indexPatternsService.getFieldsForWildcard).toHaveBeenCalledWith({
6767
pattern: indexPattern,
68+
fieldCapsOptions: { allowNoIndices: true },
6869
});
6970
});
7071

0 commit comments

Comments
 (0)