Skip to content

Commit

Permalink
fix integration tests unit tests 😅
Browse files Browse the repository at this point in the history
  • Loading branch information
Bamieh committed Apr 20, 2021
1 parent 46e3c43 commit c3a3e11
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -8,6 +8,7 @@

import type { ObjectType, Type } from '@kbn/config-schema';
import { schema } from '@kbn/config-schema';
import { set } from '@elastic/safer-lodash-set';
import { get, merge } from 'lodash';
import type { AllowedSchemaTypes } from 'src/plugins/usage_collection/server';

Expand Down Expand Up @@ -125,11 +126,18 @@ export function assertTelemetryPayload(
): void {
const fullSchema = telemetrySchema.root;

merge(
const mergedPluginsSchema = merge(
{},
get(fullSchema, 'properties.stack_stats.properties.kibana.properties.plugins'),
telemetrySchema.plugins
);

set(
fullSchema,
'properties.stack_stats.properties.kibana.properties.plugins',
mergedPluginsSchema
);

const ossTelemetryValidationSchema = convertSchemaToConfigSchema(fullSchema);

// Run @kbn/config-schema validation to the entire payload
Expand Down

0 comments on commit c3a3e11

Please sign in to comment.