Skip to content

Commit

Permalink
Merge branch 'main' of github.com:elastic/kibana into cases-delete-fi…
Browse files Browse the repository at this point in the history
…les-case-deletion
  • Loading branch information
jonathan-buttner committed Apr 3, 2023
2 parents 3b514f1 + 95d4820 commit e33c041
Show file tree
Hide file tree
Showing 40 changed files with 1,672 additions and 189 deletions.
6 changes: 3 additions & 3 deletions docs/api/data-views/update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Update a title of the `<my-view>` data view:

[source,sh]
--------------------------------------------------
$ curl -X POST api/data_views/data-view/my-view
$ curl -X POST api/data_views/data_view/my-view
{
"data_view": {
"title": "some-other-view-*"
Expand All @@ -75,7 +75,7 @@ Customize the update behavior:

[source,sh]
--------------------------------------------------
$ curl -X POST api/data_views/data-view/my-view
$ curl -X POST api/data_views/data_view/my-view
{
"refresh_fields": true,
"data_view": {
Expand All @@ -90,7 +90,7 @@ All update fields are optional, but you can specify the following fields:

[source,sh]
--------------------------------------------------
$ curl -X POST api/data_views/data-view/my-view
$ curl -X POST api/data_views/data_view/my-view
{
"data_view": {
"title": "...",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,9 @@ describe('migration actions', () => {

// Reindex doesn't return any errors on it's own, so we have to test
// together with waitForReindexTask
describe('reindex & waitForReindexTask', () => {
//
// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/154278
describe.skip('reindex & waitForReindexTask', () => {
it('resolves right when reindex succeeds without reindex script', async () => {
const res = (await reindex({
client,
Expand Down
17 changes: 16 additions & 1 deletion src/plugins/files/public/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,25 @@

import { createMockFilesClient as createBaseMocksFilesClient } from '@kbn/shared-ux-file-mocks';
import type { DeeplyMockedKeys } from '@kbn/utility-types-jest';
import type { FilesClient } from './types';
import { FilesSetup } from '.';
import type { FilesClient, FilesClientFactory } from './types';

export const createMockFilesClient = (): DeeplyMockedKeys<FilesClient> => ({
...createBaseMocksFilesClient(),
getMetrics: jest.fn(),
publicDownload: jest.fn(),
});

export const createMockFilesSetup = (): DeeplyMockedKeys<FilesSetup> => {
return {
filesClientFactory: createMockFilesClientFactory(),
registerFileKind: jest.fn(),
};
};

export const createMockFilesClientFactory = (): DeeplyMockedKeys<FilesClientFactory> => {
return {
asScoped: jest.fn(),
asUnscoped: jest.fn(),
};
};
8 changes: 7 additions & 1 deletion src/plugins/files/server/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { KibanaRequest } from '@kbn/core/server';
import { DeeplyMockedKeys } from '@kbn/utility-types-jest';
import * as stream from 'stream';
import { File } from '../common';
import { FileClient, FileServiceFactory, FileServiceStart } from '.';
import { FileClient, FileServiceFactory, FileServiceStart, FilesSetup } from '.';

export const createFileServiceMock = (): DeeplyMockedKeys<FileServiceStart> => ({
create: jest.fn(),
Expand Down Expand Up @@ -78,3 +78,9 @@ export const createFileClientMock = (): DeeplyMockedKeys<FileClient> => {
listShares: jest.fn().mockResolvedValue({ shares: [] }),
};
};

export const createFilesSetupMock = (): DeeplyMockedKeys<FilesSetup> => {
return {
registerFileKind: jest.fn(),
};
};
2 changes: 2 additions & 0 deletions test/plugin_functional/test_suites/core_plugins/rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
'xpack.apm.serviceMapEnabled (boolean)',
'xpack.apm.ui.enabled (boolean)',
'xpack.apm.ui.maxTraceItems (number)',
'xpack.cases.files.allowedMimeTypes (array)',
'xpack.cases.files.maxSize (number)',
'xpack.cases.markdownPlugins.lens (boolean)',
'xpack.ccr.ui.enabled (boolean)',
'xpack.cloud.base_url (string)',
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/asset_manager/common/types_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export interface K8sCluster extends WithTimestamp {
export interface AssetFilters {
type?: AssetType | AssetType[];
kind?: AssetKind;
ean?: string;
ean?: string | string[];
id?: string;
typeLike?: string;
eanLike?: string;
Expand Down
Loading

0 comments on commit e33c041

Please sign in to comment.