Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaElastic committed Dec 9, 2021
1 parent 43cb374 commit a0e871c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions x-pack/test/fleet_api_integration/apis/epm/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,15 @@ export default function (providerContext: FtrProviderContext) {
.auth(testUsers.fleet_read_only.username, testUsers.fleet_read_only.password)
.expect(200);
});

it('returns package info in item field when calling without version', async function () {
// this will install through the registry by default
await installPackage(testPkgName, testPkgVersion);
const res = await supertest.get(`/api/fleet/epm/packages/${testPkgName}`).expect(200);
const packageInfo = res.body.item;
// the uploaded version will have this description
expect(packageInfo.name).to.equal('apache');
await uninstallPackage(testPkgName, testPkgVersion);
});
});
}

0 comments on commit a0e871c

Please sign in to comment.