Skip to content

Commit

Permalink
Use createStubDataView over custom object
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry350 committed Nov 1, 2022
1 parent 274cec2 commit 7c99c5e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions x-pack/plugins/infra/common/log_views/resolved_log_view.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@ import { createStubDataView } from '@kbn/data-views-plugin/common/stubs';
import { defaultLogViewsStaticConfig } from './defaults';
import { ResolvedLogView, resolveLogView } from './resolved_log_view';
import { LogViewAttributes } from './types';
import { DataView, DataViewSpec } from '@kbn/data-views-plugin/common';

const dataViewMock = {
id: 'log-view-data-view-mock',
title: 'log-view-data-view-mock-title',
fields: [],
} as unknown as DataView;
import { DataViewSpec } from '@kbn/data-views-plugin/common';

export const createResolvedLogViewMock = (
resolvedLogViewOverrides: Partial<ResolvedLogView> = {}
Expand Down Expand Up @@ -48,7 +42,12 @@ export const createResolvedLogViewMock = (
messageColumn: { id: 'MESSAGE_COLUMN_ID' },
},
],
dataViewReference: dataViewMock,
dataViewReference: createStubDataView({
spec: {
id: 'log-view-data-view-mock',
title: 'log-indices-*',
},
}),
...resolvedLogViewOverrides,
});

Expand Down

0 comments on commit 7c99c5e

Please sign in to comment.