Skip to content

Commit

Permalink
[Fleet] Install Elastic Agent integration by default during setup (#9…
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Feb 19, 2021
1 parent d2a5a51 commit fa3000c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions x-pack/plugins/fleet/common/constants/epm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions x-pack/test/fleet_api_integration/apis/fleet_setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
});
});
}
2 changes: 1 addition & 1 deletion x-pack/test/fleet_api_integration/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit fa3000c

Please sign in to comment.