[Fleet] fix endpoint test (#167748)

## Summary

Closes https://github.com/elastic/kibana/issues/167729

Getting an error with package verification, added a workaround to force
install the package first.

```
    status: 400,
    text: '{"statusCode":400,"error":"Bad Request","message":"endpoint-8.10.2 failed signature verification.","attributes":{"type":"verification_failed"}}',
    method: 'POST',
    path: '/api/fleet/package_policies'
  },
```

---------

Co-authored-by: Alex Szabo <delanni.alex@gmail.com>
This commit is contained in:
Julia Bardi 2023-10-02 12:57:16 +02:00 committed by GitHub
parent 338e446f97
commit df3d0a60e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -513,6 +513,14 @@ export default function (providerContext: FtrProviderContext) {
})
.expect(200);
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
await supertest
.post(`/api/fleet/package_policies`)