forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[functional tests] split fleet_api_integration config into smaller on…
…es (elastic#156407) ## Summary Runtime for `fleet_api_integration/config` crossed the 38 min limit. Ideally config runtime should be <10 min so that pipeline can quickly retry failed configs (we do 1 retry on CI) <img width="1600" alt="image" src="https://user-images.githubusercontent.com/10977896/235707744-3120e1e9-4882-493f-9ee0-86016a765401.png"> This PR splits the existing config into few smaller ones: ``` x-pack/test/fleet_api_integration/config.agent.ts 15m 15s x-pack/test/fleet_api_integration/config.agent_policy.ts 4m 10s x-pack/test/fleet_api_integration/config.epm.ts 8m 12s x-pack/test/fleet_api_integration/config.package_policy.ts 10m 54s // combines multiple test files x-pack/test/fleet_api_integration/config.fleet.ts 5m 2s ```
- Loading branch information
1 parent
91c1ff1
commit 1c777a2
Showing
13 changed files
with
156 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
x-pack/test/fleet_api_integration/apis/package_policy/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { setupTestUsers } from '../test_users'; | ||
|
||
export default function loadTests({ loadTestFile, getService }) { | ||
describe('Package policies', () => { | ||
before(async () => { | ||
await setupTestUsers(getService('security')); | ||
}); | ||
loadTestFile(require.resolve('./create')); | ||
loadTestFile(require.resolve('./update')); | ||
loadTestFile(require.resolve('./get')); | ||
|
||
loadTestFile(require.resolve('./delete')); | ||
loadTestFile(require.resolve('./upgrade')); | ||
loadTestFile(require.resolve('./input_package_create_upgrade')); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrConfigProviderContext } from '@kbn/test'; | ||
|
||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const baseFleetApiConfig = await readConfigFile(require.resolve('./config.base.ts')); | ||
|
||
return { | ||
...baseFleetApiConfig.getAll(), | ||
testFiles: [require.resolve('./apis/agents')], | ||
junit: { | ||
reportName: 'X-Pack Fleet Agent API Integration Tests', | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrConfigProviderContext } from '@kbn/test'; | ||
|
||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const baseFleetApiConfig = await readConfigFile(require.resolve('./config.base.ts')); | ||
|
||
return { | ||
...baseFleetApiConfig.getAll(), | ||
testFiles: [require.resolve('./apis/agent_policy')], | ||
junit: { | ||
reportName: 'X-Pack Fleet Agent Policy API Integration Tests', | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrConfigProviderContext } from '@kbn/test'; | ||
|
||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const baseFleetApiConfig = await readConfigFile(require.resolve('./config.base.ts')); | ||
|
||
return { | ||
...baseFleetApiConfig.getAll(), | ||
testFiles: [require.resolve('./apis/epm')], | ||
junit: { | ||
reportName: 'X-Pack EPM API Integration Tests', | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrConfigProviderContext } from '@kbn/test'; | ||
|
||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const baseFleetApiConfig = await readConfigFile(require.resolve('./config.base.ts')); | ||
|
||
return { | ||
...baseFleetApiConfig.getAll(), | ||
testFiles: [require.resolve('./apis')], | ||
junit: { | ||
reportName: 'X-Pack Fleet API Integration Tests', | ||
}, | ||
}; | ||
} |
20 changes: 20 additions & 0 deletions
20
x-pack/test/fleet_api_integration/config.package_policy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrConfigProviderContext } from '@kbn/test'; | ||
|
||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const baseFleetApiConfig = await readConfigFile(require.resolve('./config.base.ts')); | ||
|
||
return { | ||
...baseFleetApiConfig.getAll(), | ||
testFiles: [require.resolve('./apis/package_policy')], | ||
junit: { | ||
reportName: 'X-Pack Fleet Package Policy API Integration Tests', | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters