diff --git a/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.test.ts b/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.test.ts index eec59a647c39d..7d5a7966f91c3 100644 --- a/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.test.ts +++ b/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.test.ts @@ -115,5 +115,36 @@ describe('toPackagePolicy', () => { 'nginx-nginx/metrics': ['nginx.stubstatus'], }); }); + + it('should to pass experimental_data_stream_features', () => { + const res = simplifiedPackagePolicytoNewPackagePolicy( + { + name: 'nginx-1', + namespace: 'default', + policy_id: 'policy123', + description: 'Test description', + }, + nginxPackageInfo as unknown as PackageInfo, + { + experimental_data_stream_features: [ + { + data_stream: 'logs-nginx.access', + features: { + synthetic_source: true, + }, + }, + ], + } + ); + + expect(res.package?.experimental_data_stream_features).toEqual([ + { + data_stream: 'logs-nginx.access', + features: { + synthetic_source: true, + }, + }, + ]); + }); }); }); diff --git a/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.ts b/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.ts index c0d05d1eeab2a..a17796e4b8561 100644 --- a/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.ts +++ b/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.ts @@ -11,6 +11,7 @@ import type { PackagePolicyConfigRecord, NewPackagePolicy, PackageInfo, + ExperimentalDataStreamFeature, } from '../types'; import { PackagePolicyValidationError } from '../errors'; @@ -66,7 +67,10 @@ type InputMap = Map