From 8a83e278d5aa34d08d26a68e0739207faffd087d Mon Sep 17 00:00:00 2001 From: Jen Huang Date: Thu, 2 Jul 2020 17:26:55 -0700 Subject: [PATCH] Revert unnecessary version fields in tests, fix schema --- .../common/services/package_configs_to_agent_inputs.test.ts | 1 - .../server/routes/package_config/handlers.test.ts | 1 - .../ingest_manager/server/types/models/package_config.ts | 4 ++-- .../security_solution/common/endpoint/generate_data.ts | 1 - .../pages/policy/store/policy_details/index.test.ts | 1 - 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/ingest_manager/common/services/package_configs_to_agent_inputs.test.ts b/x-pack/plugins/ingest_manager/common/services/package_configs_to_agent_inputs.test.ts index 1fa101287fbed..a4d87f54b0915 100644 --- a/x-pack/plugins/ingest_manager/common/services/package_configs_to_agent_inputs.test.ts +++ b/x-pack/plugins/ingest_manager/common/services/package_configs_to_agent_inputs.test.ts @@ -21,7 +21,6 @@ describe('Ingest Manager - storedPackageConfigsToAgentInputs', () => { namespace: 'default', inputs: [], revision: 1, - version: '', }; const mockInput: PackageConfigInput = { diff --git a/x-pack/plugins/ingest_manager/server/routes/package_config/handlers.test.ts b/x-pack/plugins/ingest_manager/server/routes/package_config/handlers.test.ts index f7324ae6cb941..6d712ce063290 100644 --- a/x-pack/plugins/ingest_manager/server/routes/package_config/handlers.test.ts +++ b/x-pack/plugins/ingest_manager/server/routes/package_config/handlers.test.ts @@ -30,7 +30,6 @@ jest.mock('../../services/package_config', (): { ...newData, id: '1', revision: 1, - version: 'xxxx', updated_at: new Date().toISOString(), updated_by: 'elastic', created_at: new Date().toISOString(), diff --git a/x-pack/plugins/ingest_manager/server/types/models/package_config.ts b/x-pack/plugins/ingest_manager/server/types/models/package_config.ts index 1df0aa9fbd6df..0823ccd85a32b 100644 --- a/x-pack/plugins/ingest_manager/server/types/models/package_config.ts +++ b/x-pack/plugins/ingest_manager/server/types/models/package_config.ts @@ -68,11 +68,11 @@ export const NewPackageConfigSchema = schema.object({ export const UpdatePackageConfigSchema = schema.object({ ...PackageConfigBaseSchema, - version: schema.string(), + version: schema.maybe(schema.string()), }); export const PackageConfigSchema = schema.object({ ...PackageConfigBaseSchema, id: schema.string(), - version: schema.string(), + version: schema.maybe(schema.string()), }); diff --git a/x-pack/plugins/security_solution/common/endpoint/generate_data.ts b/x-pack/plugins/security_solution/common/endpoint/generate_data.ts index 45ef5849551d8..6720f3523d5c7 100644 --- a/x-pack/plugins/security_solution/common/endpoint/generate_data.ts +++ b/x-pack/plugins/security_solution/common/endpoint/generate_data.ts @@ -1054,7 +1054,6 @@ export class EndpointDocGenerator { version: '1.0.0', }, revision: 1, - version: 'xxxx', }; } diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts index 8541d872bb5ae..0bd623b27f4fb 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts @@ -61,7 +61,6 @@ describe('policy details: ', () => { version: '', }, revision: 1, - version: 'xxxx', }, }, });