diff --git a/x-pack/plugins/ingest_manager/server/services/epm/packages/get.ts b/x-pack/plugins/ingest_manager/server/services/epm/packages/get.ts index 78aa513d1a1dc..7093723806ea3 100644 --- a/x-pack/plugins/ingest_manager/server/services/epm/packages/get.ts +++ b/x-pack/plugins/ingest_manager/server/services/epm/packages/get.ts @@ -69,7 +69,7 @@ export async function getLimitedPackages(options: { }); }) ); - return installedPackagesInfo.filter((pkgInfo) => isPackageLimited).map((pkgInfo) => pkgInfo.name); + return installedPackagesInfo.filter(isPackageLimited).map((pkgInfo) => pkgInfo.name); } export async function getPackageSavedObjects(savedObjectsClient: SavedObjectsClientContract) { diff --git a/x-pack/test/ingest_manager_api_integration/apis/epm/list.ts b/x-pack/test/ingest_manager_api_integration/apis/epm/list.ts index 1ac1474e03700..64e8aa16955a5 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/epm/list.ts +++ b/x-pack/test/ingest_manager_api_integration/apis/epm/list.ts @@ -34,5 +34,21 @@ export default function ({ getService }: FtrProviderContext) { warnAndSkipTest(this, log); } }); + + it('lists all limited packages from the registry', async function () { + if (server.enabled) { + const fetchLimitedPackageList = async () => { + const response = await supertest + .get('/api/ingest_manager/epm/packages/limited') + .set('kbn-xsrf', 'xxx') + .expect(200); + return response.body; + }; + const listResponse = await fetchLimitedPackageList(); + expect(listResponse.response).to.eql(['endpoint']); + } else { + warnAndSkipTest(this, log); + } + }); }); }