From 2a17a51ca4321302ecffeb3152e857e4a21d6d7f Mon Sep 17 00:00:00 2001 From: pgayvallet Date: Fri, 14 Jul 2023 09:40:04 +0200 Subject: [PATCH] fixing usages - 2 --- .../src/bundle_routes/register_bundle_routes.test.ts | 3 ++- .../src/test_helpers/mocks.ts | 1 + .../src/discovery/plugin_manifest_parser.test.ts | 7 ++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/core/apps/core-apps-server-internal/src/bundle_routes/register_bundle_routes.test.ts b/packages/core/apps/core-apps-server-internal/src/bundle_routes/register_bundle_routes.test.ts index 7f444d3221a38..e6550f6e86cb6 100644 --- a/packages/core/apps/core-apps-server-internal/src/bundle_routes/register_bundle_routes.test.ts +++ b/packages/core/apps/core-apps-server-internal/src/bundle_routes/register_bundle_routes.test.ts @@ -15,13 +15,14 @@ import { registerBundleRoutes } from './register_bundle_routes'; import { FileHashCache } from './file_hash_cache'; const createPackageInfo = (parts: Partial = {}): PackageInfo => ({ - ...parts, buildNum: 42, buildSha: 'sha', dist: true, branch: 'master', version: '8.0.0', buildDate: new Date('2023-05-15T23:12:09.000Z'), + buildFlavor: 'traditional', + ...parts, }); const createUiPlugins = (...ids: string[]): UiPlugins => ({ diff --git a/packages/core/plugins/core-plugins-browser-internal/src/test_helpers/mocks.ts b/packages/core/plugins/core-plugins-browser-internal/src/test_helpers/mocks.ts index aea293345175f..787a7d7678194 100644 --- a/packages/core/plugins/core-plugins-browser-internal/src/test_helpers/mocks.ts +++ b/packages/core/plugins/core-plugins-browser-internal/src/test_helpers/mocks.ts @@ -25,6 +25,7 @@ export const createPluginInitializerContextMock = (config: unknown = {}) => { buildSha: 'buildSha', dist: false, buildDate: new Date('2023-05-15T23:12:09.000Z'), + buildFlavor: 'traditional', }, }, logger: loggerMock.create(), diff --git a/packages/core/plugins/core-plugins-server-internal/src/discovery/plugin_manifest_parser.test.ts b/packages/core/plugins/core-plugins-server-internal/src/discovery/plugin_manifest_parser.test.ts index 9f2cd298adfbd..35cff51f820f9 100644 --- a/packages/core/plugins/core-plugins-server-internal/src/discovery/plugin_manifest_parser.test.ts +++ b/packages/core/plugins/core-plugins-server-internal/src/discovery/plugin_manifest_parser.test.ts @@ -8,20 +8,21 @@ import { mockReadFile } from './plugin_manifest_parser.test.mocks'; -import { PluginDiscoveryErrorType } from './plugin_discovery_error'; - import { resolve } from 'path'; +import type { PackageInfo } from '@kbn/config'; +import { PluginDiscoveryErrorType } from './plugin_discovery_error'; import { parseManifest } from './plugin_manifest_parser'; const pluginPath = resolve('path', 'existent-dir'); const pluginManifestPath = resolve(pluginPath, 'kibana.json'); -const packageInfo = { +const packageInfo: PackageInfo = { branch: 'master', buildNum: 1, buildSha: '', version: '7.0.0-alpha1', dist: false, buildDate: new Date('2023-05-15T23:12:09.000Z'), + buildFlavor: 'traditional', }; afterEach(() => {