Skip to content

Commit

Permalink
[Fleet] Make fetch installed packages test assertions more granular (#…
Browse files Browse the repository at this point in the history
…164567)

## Summary

For investigating #163203 I want
to double check which package is not being returned.
  • Loading branch information
hop-dev authored Aug 23, 2023
1 parent 58b4104 commit 40ba6b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion x-pack/test/fleet_api_integration/apis/epm/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ export default function (providerContext: FtrProviderContext) {
it('Allows the fetching of installed packages', async () => {
const res = await supertest.get(`/api/fleet/epm/packages/installed`).expect(200);
const packages = res.body.items;
expect(packages.length).to.be(3);
const packageNames = packages.map((pkg: any) => pkg.name);
expect(packageNames).to.contain('apache');
expect(packageNames).to.contain('endpoint');
expect(packageNames).to.contain('experimental');
expect(packageNames.length).to.be(3);
});
it('Can be limited with perPage', async () => {
const res = await supertest.get(`/api/fleet/epm/packages/installed?perPage=2`).expect(200);
Expand Down

0 comments on commit 40ba6b6

Please sign in to comment.