From 17ce710e99be75a2f182be4ebc69adf8569bfe46 Mon Sep 17 00:00:00 2001 From: Julia Bardi Date: Mon, 2 Oct 2023 11:43:08 +0200 Subject: [PATCH] fix endpoint test --- .../apis/agent_policy/agent_policy.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts b/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts index 6cf131939807c..6b594313de1a0 100644 --- a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts +++ b/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts @@ -513,8 +513,16 @@ export default function (providerContext: FtrProviderContext) { }) .expect(200); - // add endpoint package policy, which is required for tamper protection await supertest + .post(`/api/fleet/epm/packages/endpoint/8.10.2`) + .set('kbn-xsrf', 'xxxx') + .send({ + force: true, + }) + .expect(200); + + // add endpoint package policy, which is required for tamper protection + const res = await supertest .post(`/api/fleet/package_policies`) .set('kbn-xsrf', 'xxxx') .send({