diff --git a/x-pack/plugins/fleet/common/services/validate_package_policy.test.ts b/x-pack/plugins/fleet/common/services/validate_package_policy.test.ts index e4566bacdae54..6d479894793de 100644 --- a/x-pack/plugins/fleet/common/services/validate_package_policy.test.ts +++ b/x-pack/plugins/fleet/common/services/validate_package_policy.test.ts @@ -556,8 +556,7 @@ describe('Fleet - validatePackagePolicy()', () => { }); }); - // TODO enable when https://github.com/elastic/kibana/issues/125655 is fixed - it.skip('returns package policy validation error if input var does not exist', () => { + it('returns package policy validation error if input var does not exist', () => { expect( validatePackagePolicy( { diff --git a/x-pack/plugins/fleet/common/services/validate_package_policy.ts b/x-pack/plugins/fleet/common/services/validate_package_policy.ts index 3c0c0e5e92116..d61714b9a3d31 100644 --- a/x-pack/plugins/fleet/common/services/validate_package_policy.ts +++ b/x-pack/plugins/fleet/common/services/validate_package_policy.ts @@ -210,11 +210,15 @@ export const validatePackagePolicyConfig = ( } if (varDef === undefined) { - // TODO return validation error here once https://github.com/elastic/kibana/issues/125655 is fixed - // eslint-disable-next-line no-console - console.debug(`No variable definition for ${varName} found`); - - return null; + errors.push( + i18n.translate('xpack.fleet.packagePolicyValidation.nonExistentVarMessage', { + defaultMessage: '{varName} var definition does not exist', + values: { + varName, + }, + }) + ); + return errors; } if (varDef.required) {