From 8d228564328c4daf592153dae4d8e10a354592ba Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Tue, 23 Jul 2024 08:55:23 -0400 Subject: [PATCH] fix cypress tests --- x-pack/plugins/fleet/cypress/e2e/install_assets.cy.ts | 2 ++ x-pack/plugins/fleet/server/types/rest_spec/epm.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/x-pack/plugins/fleet/cypress/e2e/install_assets.cy.ts b/x-pack/plugins/fleet/cypress/e2e/install_assets.cy.ts index e22d601d06c33..631f38b0f33d3 100644 --- a/x-pack/plugins/fleet/cypress/e2e/install_assets.cy.ts +++ b/x-pack/plugins/fleet/cypress/e2e/install_assets.cy.ts @@ -39,6 +39,7 @@ describe('Install unverified package assets', () => { // save mocking out the whole package response, but make it so that fleet server is always uninstalled cy.intercept('GET', '/api/fleet/epm/packages/fleet_server*', (req) => { + console.log('TATA'); req.continue((res) => { if (res.body?.item?.installationInfo) { delete res.body.item.installationInfo; @@ -46,6 +47,7 @@ describe('Install unverified package assets', () => { if (res.body?.item?.status) { res.body.item.status = 'not_installed'; } + res.body.metadata = { has_policies: false }; }); }); }); diff --git a/x-pack/plugins/fleet/server/types/rest_spec/epm.ts b/x-pack/plugins/fleet/server/types/rest_spec/epm.ts index c6d3811bd713e..358d2c8d6345d 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/epm.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/epm.ts @@ -104,6 +104,7 @@ export const GetInfoRequestSchemaDeprecated = { ignoreUnverified: schema.maybe(schema.boolean()), prerelease: schema.maybe(schema.boolean()), full: schema.maybe(schema.boolean()), + withMetadata: schema.boolean({ defaultValue: false }), }), };