Skip to content

Commit

Permalink
[7.17] revert package policy validation that caused issue with input …
Browse files Browse the repository at this point in the history
…groups (#125657) (#136338)

* revert package policy validation that caused issue with input groups (#125657)

(cherry picked from commit 35f4ba5)

# Conflicts:
#	x-pack/plugins/fleet/common/services/validate_package_policy.test.ts

* Skip test

Co-authored-by: Julia Bardi <[email protected]>
  • Loading branch information
kpollich and juliaElastic authored Jul 14, 2022
1 parent 661c4ed commit 28c0afc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,8 @@ describe('Fleet - validatePackagePolicy()', () => {
});
});

it('returns package policy validation error if input var does not exist', () => {
// 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', () => {
expect(
validatePackagePolicy(
{
Expand Down
14 changes: 5 additions & 9 deletions x-pack/plugins/fleet/common/services/validate_package_policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,11 @@ export const validatePackagePolicyConfig = (
}

if (varDef === undefined) {
errors.push(
i18n.translate('xpack.fleet.packagePolicyValidation.nonExistentVarMessage', {
defaultMessage: '{varName} var definition does not exist',
values: {
varName,
},
})
);
return errors;
// 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;
}

if (varDef.required) {
Expand Down

0 comments on commit 28c0afc

Please sign in to comment.