Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions x-pack/platform/test/fleet_api_integration/apis/agents/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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')
Expand Down
13 changes: 12 additions & 1 deletion x-pack/platform/test/fleet_api_integration/config.agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,23 @@ import { 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"`,
],
},
};
}
Loading