[Fleet] Install Elastic Agent integration by default during setup (#91676)

This commit is contained in:
Nicolas Chaulet 2021-02-18 18:45:15 -05:00 committed by GitHub
parent 0f804677de
commit fe35e0de3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

View file

@ -15,6 +15,7 @@ export const FLEET_SERVER_PACKAGE = 'fleet_server';
export const requiredPackages = {
System: 'system',
Endpoint: 'endpoint',
ElasticAgent: 'elastic_agent',
} as const;
// these are currently identical. we can separate if they later diverge

View file

@ -105,5 +105,19 @@ export default function (providerContext: FtrProviderContext) {
transient_metadata: { enabled: true },
});
});
it('should install default packages', async () => {
await supertest.post(`/api/fleet/setup`).set('kbn-xsrf', 'xxxx').expect(200);
const { body: apiResponse } = await supertest
.get(`/api/fleet/epm/packages?experimental=true`)
.expect(200);
const installedPackages = apiResponse.response
.filter((p: any) => p.status === 'installed')
.map((p: any) => p.name)
.sort();
expect(installedPackages).to.eql(['elastic_agent', 'endpoint', 'system']);
});
});
}

View file

@ -15,7 +15,7 @@ import { defineDockerServersConfig } from '@kbn/test';
// example: https://beats-ci.elastic.co/blue/organizations/jenkins/Ingest-manager%2Fpackage-storage/detail/snapshot/74/pipeline/257#step-302-log-1.
// It should be updated any time there is a new Docker image published for the Snapshot Distribution of the Package Registry.
export const dockerImage =
'docker.elastic.co/package-registry/distribution:5314869e2f6bc01d37b8652f7bda89248950b3a4';
'docker.elastic.co/package-registry/distribution:99dadb957d76b704637150d34a7219345cc0aeef';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts'));