diff --git a/x-pack/platform/test/fleet_api_integration/apis/agents/list.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/list.ts index c57dcd65d0ca7..de92975297b3c 100644 --- a/x-pack/platform/test/fleet_api_integration/apis/agents/list.ts +++ b/x-pack/platform/test/fleet_api_integration/apis/agents/list.ts @@ -19,8 +19,7 @@ export default function ({ getService }: FtrProviderContext) { const mockAgentlessApiService = setupMockServer(); let elasticAgentpkgVersion: string; - // FLAKY: https://github.com/elastic/kibana/issues/170690 - describe.skip('fleet_list_agent', () => { + describe('fleet_list_agent', () => { let mockApiServer: http.Server; before(async () => { @@ -316,18 +315,6 @@ export default function ({ getService }: FtrProviderContext) { }); it('should not return agentless agents when showAgentless=false', async () => { - // Set up default Fleet Server host, needed during agentless agent creation - await supertest - .post(`/api/fleet/fleet_server_hosts`) - .set('kbn-xsrf', 'xxxx') - .send({ - id: 'fleet-default-fleet-server-host', - name: 'Default', - is_default: true, - host_urls: ['https://test.com:8080', 'https://test.com:8081'], - }) - .expect(200); - // Create an agentless agent policy const { body: policyRes } = await supertest .post('/api/fleet/agent_policies') diff --git a/x-pack/platform/test/fleet_api_integration/config.agent.ts b/x-pack/platform/test/fleet_api_integration/config.agent.ts index 782f77457d4e9..c49634dd12cee 100644 --- a/x-pack/platform/test/fleet_api_integration/config.agent.ts +++ b/x-pack/platform/test/fleet_api_integration/config.agent.ts @@ -9,12 +9,23 @@ import type { FtrConfigProviderContext } from '@kbn/test'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { const baseFleetApiConfig = await readConfigFile(require.resolve('./config.base.ts')); + const baseConfig = baseFleetApiConfig.getAll(); return { - ...baseFleetApiConfig.getAll(), + ...baseConfig, testFiles: [require.resolve('./apis/agents')], junit: { reportName: 'X-Pack Fleet Agent API Integration Tests', }, + kbnTestServer: { + ...baseConfig.kbnTestServer, + serverArgs: [ + ...baseConfig.kbnTestServer.serverArgs, + // Add cloud configuration specifically for agent tests (needed for agentless functionality in ESS) + `--xpack.cloud.id="ftr_fake_cloud_id:aGVsbG8uY29tOjQ0MyRFUzEyM2FiYyRrYm4xMjNhYmM="`, + `--xpack.cloud.base_url="https://cloud.elastic.co"`, + `--xpack.cloud.deployment_url="/deployments/deploymentId"`, + ], + }, }; }