diff --git a/.buildkite/ftr_platform_stateful_configs.yml b/.buildkite/ftr_platform_stateful_configs.yml index 2b766541f1d66..4457c746ee110 100644 --- a/.buildkite/ftr_platform_stateful_configs.yml +++ b/.buildkite/ftr_platform_stateful_configs.yml @@ -13,7 +13,7 @@ disabled: - x-pack/platform/test/functional_with_es_ssl/config.base.ts - x-pack/test/api_integration/config.ts - x-pack/platform/test/api_integration/config.ts - - x-pack/test/fleet_api_integration/config.base.ts + - x-pack/platform/test/fleet_api_integration/config.base.ts - x-pack/platform/test/functional_basic/apps/ml/config.base.ts - x-pack/platform/test/functional_basic/apps/transform/config.base.ts - x-pack/platform/test/api_integration_basic/config.basic_license.ts @@ -164,12 +164,15 @@ enabled: - x-pack/platform/test/disable_ems/config.ts - x-pack/platform/test/examples/config.ts - x-pack/test/fleet_api_integration/config.agent.ts - - x-pack/test/fleet_api_integration/config.agent_policy.ts - x-pack/test/fleet_api_integration/config.epm.ts - - x-pack/test/fleet_api_integration/config.event_ingested.ts - - x-pack/test/fleet_api_integration/config.fleet.ts - x-pack/test/fleet_api_integration/config.package_policy.ts - - x-pack/test/fleet_api_integration/config.space_awareness.ts + - x-pack/platform/test/fleet_api_integration/config.agent.ts + - x-pack/platform/test/fleet_api_integration/config.agent_policy.ts + - x-pack/platform/test/fleet_api_integration/config.epm.ts + - x-pack/platform/test/fleet_api_integration/config.event_ingested.ts + - x-pack/platform/test/fleet_api_integration/config.fleet.ts + - x-pack/platform/test/fleet_api_integration/config.package_policy.ts + - x-pack/platform/test/fleet_api_integration/config.space_awareness.ts - x-pack/test/fleet_functional/config.ts - x-pack/platform/test/fleet_tasks/config.ts - x-pack/platform/test/ftr_apis/security_and_spaces/config.ts diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7f122220cccd9..436204d899d77 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1508,6 +1508,7 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions /x-pack/test/functional/es_archives/fleet @elastic/fleet /x-pack/test/api_integration/services/fleet_and_agents.ts @elastic/fleet /x-pack/test/fleet_api_integration @elastic/fleet +/x-pack/platform/test/fleet_api_integration @elastic/fleet /x-pack/platform/test/fleet_packages @elastic/fleet /x-pack/platform/test/fleet_tasks @elastic/fleet /src/platform/test/api_integration/apis/custom_integration/*.ts @elastic/fleet diff --git a/.github/paths-labeller.yml b/.github/paths-labeller.yml index ae69ba388364c..9f6f48d264246 100644 --- a/.github/paths-labeller.yml +++ b/.github/paths-labeller.yml @@ -17,7 +17,7 @@ - 'x-pack/solutions/observability/plugins/ux/**/*.*' - 'Team:Fleet': - 'x-pack/platform/plugins/shared/fleet/**/*.*' - - 'x-pack/test/fleet_api_integration/**/*.*' + - 'x-pack/platform/test/fleet_api_integration/**/*.*' - 'Team:obs-ux-management': - 'x-pack/solutions/observability/plugins/observability/**/*.*' - 'x-pack/solutions/observability/plugins/slo/**/*.*' diff --git a/x-pack/platform/plugins/shared/fleet/README.md b/x-pack/platform/plugins/shared/fleet/README.md index d572b5d31c9a1..2f48a0d748373 100644 --- a/x-pack/platform/plugins/shared/fleet/README.md +++ b/x-pack/platform/plugins/shared/fleet/README.md @@ -26,9 +26,10 @@ Running a [self-managed stack](https://www.elastic.co/guide/en/fleet/current/add Refer to the [Contributing to Kibana](https://github.com/elastic/kibana/blob/main/CONTRIBUTING.md) documentation for getting started with developing for Kibana. As detailed under the Contributing section of the documentation, we follow the pattern of developing feature branches under your personal fork of Kibana. -Fleet development usually requires running Kibana from source alongside a snapshot of Elasticsearch, as detailed in the [Contributing to Kibana](https://github.com/elastic/kibana/blob/main/CONTRIBUTING.md) documentation. The next section provides an overview of this process. +Fleet development usually requires running Kibana from source alongside a snapshot of Elasticsearch, as detailed in the [Contributing to Kibana](https://github.com/elastic/kibana/blob/main/CONTRIBUTING.md) documentation. The next section provides an overview of this process. In addition, it is typically needed to set up a Fleet Server and enroll Elastic Agents in Fleet. Refer to one of the following guides depending on your requirements for details: + - [Running a local Fleet Server and enrolling Elastic Agents](dev_docs/local_setup/enrolling_agents.md) for developing Kibana in stateful (not serverless) mode - [Developing Kibana in serverless mode](dev_docs/local_setup/developing_kibana_in_serverless.md) for developing Kibana in serverless mode - [Developing Kibana and Fleet Server simultaneously](dev_docs/local_setup/developing_kibana_and_fleet_server.md) for doing simultaneous Kibana and Fleet Server development @@ -37,10 +38,12 @@ In addition, it is typically needed to set up a Fleet Server and enroll Elastic ### Running Fleet locally in stateful mode Prerequisites: + - Fork the Kibana repository and clone it locally - Install the `node` and `yarn` versions required by `.nvmrc` Once that is set up, the high level steps are: + - Run Elasticsearch from snapshot - Configure Kibana settings - Run Kibana from source @@ -52,6 +55,7 @@ Once that is set up, the high level steps are: As detailed in [Running Elasticsearch during development](https://www.elastic.co/guide/en/kibana/current/running-elasticsearch.html), there are different ways to run Elasticsearch when developing Kibana, with snapshot being the most common. To do this, run the following from the Kibana root folder: + ```sh yarn es snapshot --license trial ``` @@ -59,6 +63,7 @@ yarn es snapshot --license trial The `--license trial` flag provides the equivalent of a Platinum license (defaults to Basic). In addition, it can be useful to set a folder for preserving data between runs (by default, data is stored inside the snapshot and lost on exit) with the `-E path.data=` setting. Common path choices are: + - `../data` (or any other name, e.g. `../mycluster`), which saves the data in the `.es` folder (in the Kibana root folder) - `/tmp/es-data` @@ -67,6 +72,7 @@ Note: the required API key service and token service (cf. [Security settings in Finally, setting up a Fleet Server requires setting the HTTP host to Fleet Server default host with `-E http.host=0.0.0.0`. The complete command usually looks like: + ```sh yarn es snapshot --license trial -E path.data=../data -E http.host=0.0.0.0 ``` @@ -78,17 +84,21 @@ Create a `config/kibana.dev.yml` file if you don't have one by copying the exist To get started, it is recommended to set the following settings: 1\. The URL at which Kibana is available for end users: unless explicitly specified, this path is randomized in dev mode (refer to [Considerations for basepath](https://www.elastic.co/guide/en/kibana/current/development-basepath.html) for details). To set it, add the following to your `kibana.dev.yml`: + ```yml server.basePath: /yourPath ``` + where `yourPath` is a path of your choice (e.g. your name; must not end with a slash). 2\. The API version resolution: in dev mode, a version is required for all API requests. In other environements (e.g. production), the version falls back to `oldest` in stateful mode and `newest` in serverless mode for public APIs, while internal APIs always require a version. Set the API version resolution with: + ```yml server.versioned.versionResolution: oldest ``` 3\. Fleet logging: + ```yml logging: loggers: @@ -140,6 +150,7 @@ yarn jest --config x-pack/platform/plugins/shared/fleet/jest.config.dev.js x-pac ``` Or alternatively: + ```sh yarn test:jest x-pack/platform/plugins/shared/fleet/common/services/validate_package_policy.test.ts ``` @@ -152,28 +163,29 @@ Note: Docker needs to be running to run these tests. 1\. In one terminal, run the server from the Kibana root folder with - ```sh - FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:server --config x-pack/test/fleet_api_integration/ - ``` +```sh +FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:server --config x-pack/platform/test/fleet_api_integration/ +``` - where `configFile` is the relevant config file relevant from the following: - - config.agent.ts - - config.agent_policy.ts - - config.epm.ts - - config.fleet.ts - - config.package_policy.ts +where `configFile` is the relevant config file relevant from the following: + +- config.agent.ts +- config.agent_policy.ts +- config.epm.ts +- config.fleet.ts +- config.package_policy.ts 2\. In a second terminal, run the tests from the Kibana root folder with - ```sh - FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/test/fleet_api_integration/ - ``` +```sh +FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/platform/test/fleet_api_integration/ +``` - Optionally, you can filter which tests you want to run using `--grep` +Optionally, you can filter which tests you want to run using `--grep` - ```sh - FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/test/fleet_api_integration/ --grep='my filter string' - ``` +```sh +FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/platform/test/fleet_api_integration/ --grep='my filter string' +``` Note: you can supply which Docker image to use for the Package Registry via the `FLEET_PACKAGE_REGISTRY_DOCKER_IMAGE` env variable. For example, @@ -192,12 +204,14 @@ FLEET_SKIP_RUNNING_PACKAGE_REGISTRY=true FLEET_PACKAGE_REGISTRY_PORT=12345 yarn The process for running serverless API integration tests is similar to above. Security and observability project types have Fleet enabled. At the time of writing, the same tests exist for Fleet under these two project types. Security: + ```sh FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:server --config x-pack/test_serverless/api_integration/test_suites/security/fleet/config.ts FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/test_serverless/api_integration/test_suites/security/fleet/config.ts ``` Observability: + ```sh FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:server --config x-pack/test_serverless/api_integration/test_suites/observability/fleet/config.ts FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/test_serverless/api_integration/test_suites/observability/fleet/config.ts @@ -255,14 +269,14 @@ The projects below are dependent on Fleet, most using Fleet API as well. In case Fleet supports shipping integrations as `.zip` archives with Kibana's source code through a concept referred to as _bundled packages_. This allows integrations like APM, which is enabled by default in Cloud, to reliably provide upgrade paths without internet access, and generally improves stability around Fleet's installation/setup processes for several common integrations. -The set of bundled packages included with Kibana is dictated by a top-level `fleet_packages.json` file in the Kibana repo. This file includes a list of packages with a pinned version that Kibana will consider bundled. When the Kibana distributable is built, a [build task](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/bundle_fleet_packages.ts) will resolve these packages from the Elastic Package Registry, download the appropriate version as a `.zip` archive, and place it in a directory configurable by a `xpack.fleet.bundledPackageLocation` value in `kibana.yml`. By default, these archives are stored in `x-pack/platform/plugins/shared/fleet/.target/bundled_packages/`. In CI/CD, we [override](https://github.com/elastic/kibana/blob/main/x-pack/test/fleet_api_integration/config.base.ts#L19) this default with `/tmp/fleet_bundled_packages`. +The set of bundled packages included with Kibana is dictated by a top-level `fleet_packages.json` file in the Kibana repo. This file includes a list of packages with a pinned version that Kibana will consider bundled. When the Kibana distributable is built, a [build task](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/bundle_fleet_packages.ts) will resolve these packages from the Elastic Package Registry, download the appropriate version as a `.zip` archive, and place it in a directory configurable by a `xpack.fleet.bundledPackageLocation` value in `kibana.yml`. By default, these archives are stored in `x-pack/platform/plugins/shared/fleet/.target/bundled_packages/`. In CI/CD, we [override](https://github.com/elastic/kibana/blob/main/x-pack/platform/test/fleet_api_integration/config.base.ts#L19) this default with `/tmp/fleet_bundled_packages`. Until further automation is added, this `fleet_packages.json` file should be updated as part of the release process to ensure the latest compatible version of each bundled package is included with that Kibana version. **This must be done before the final BC for a release is built.** Tracking issues should be opened and tracked by the Fleet UI team. See https://github.com/elastic/kibana/issues/129309 as an example. As part of the bundled package update process, we'll likely also need to update the pinned Docker image that runs in Kibana's test environment. We configure this pinned registry image in -- `x-pack/test/fleet_api_integration/config.ts` +- `x-pack/platform/test/fleet_api_integration/config.ts` - `x-pack/platform/plugins/shared/fleet/server/integration_tests/helpers/docker_registry_helper.ts` - `x-pack/test/functional/config.base.js` diff --git a/x-pack/platform/plugins/shared/fleet/dev_docs/api_integration_tests.md b/x-pack/platform/plugins/shared/fleet/dev_docs/api_integration_tests.md index 1ca9da1956d02..0d2422165e579 100644 --- a/x-pack/platform/plugins/shared/fleet/dev_docs/api_integration_tests.md +++ b/x-pack/platform/plugins/shared/fleet/dev_docs/api_integration_tests.md @@ -5,7 +5,7 @@ Many API integration tests for Ingest Manager trigger at some point a connection - the deployed registry is temporarily unavailable - the packages served by the registry do not match the expectation of the code under test -For that reason, we run a dockerized version of the package registry in Kibana CI. For this to work, our tests must run against a custom test configuration and be kept in a custom directory, `x-pack/test/fleet_api_integration`. +For that reason, we run a dockerized version of the package registry in Kibana CI. For this to work, our tests must run against a custom test configuration and be kept in a custom directory, `x-pack/platform/test/fleet_api_integration`. ## How to run the tests locally @@ -13,21 +13,21 @@ Usually, having the test server and the test runner in two different shells is m ``` $ export FLEET_PACKAGE_REGISTRY_PORT=12345 -$ yarn test:ftr:server --config x-pack/test/fleet_api_integration/config.ts +$ yarn test:ftr:server --config x-pack/platform/test/fleet_api_integration/config.ts ``` In another shell in the same directory, run ``` $ export FLEET_PACKAGE_REGISTRY_PORT=12345 -$ yarn test:ftr:runner --config x-pack/test/fleet_api_integration/config.ts +$ yarn test:ftr:runner --config x-pack/platform/test/fleet_api_integration/config.ts ``` However, it is also possible to **alternatively** run everything in one go, again from the main `kibana` directory: ``` $ export FLEET_PACKAGE_REGISTRY_PORT=12345 -$ yarn test:ftr --config x-pack/test/fleet_api_integration/config.ts +$ yarn test:ftr --config x-pack/platform/test/fleet_api_integration/config.ts ``` Port `12345` is used as an example here, it can be anything, but the environment variable has to be present for the tests to run at all. @@ -37,7 +37,7 @@ Port `12345` is used as an example here, it can be anything, but the environment We use the `DockerServers` service provided by `kbn-test`. The documentation for this functionality can be found here: https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-test/src/functional_test_runner/lib/docker_servers/README.md -The main configuration for the `DockerServers` service for our tests can be found in `x-pack/test/fleet_api_integration/config.ts`: +The main configuration for the `DockerServers` service for our tests can be found in `x-pack/platform/test/fleet_api_integration/config.ts`: ### Specify the arguments to pass to `docker run`: @@ -74,7 +74,7 @@ The containerized package registry contains a set of packages which should be su docker run -p 8080:8080 docker.elastic.co/package-registry/package-registry:kibana-testing-1 ``` -Additional packages for testing certain corner cases or error conditions can be put into `x-pack/test/fleet_api_integration/apis/fixtures/test_packages`. A package `filetest` has been added there as an example. +Additional packages for testing certain corner cases or error conditions can be put into `x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages`. A package `filetest` has been added there as an example. ## Some DockerServers background diff --git a/x-pack/platform/plugins/shared/fleet/dev_docs/space_awareness.md b/x-pack/platform/plugins/shared/fleet/dev_docs/space_awareness.md index aa7a340370e35..ea6bc20a45bf7 100644 --- a/x-pack/platform/plugins/shared/fleet/dev_docs/space_awareness.md +++ b/x-pack/platform/plugins/shared/fleet/dev_docs/space_awareness.md @@ -77,4 +77,4 @@ appContextService.getInternalUserSOClientWithoutSpaceExtension().find({ ## Testing -As we need the feature flag enabled there is a special test config for space awareness in `x-pack/test/fleet_api_integration/apis/space_awareness` it's important to have test coverage that entities that should only be accessible in a space are not accessible in a other one. +As we need the feature flag enabled there is a special test config for space awareness in `x-pack/platform/test/fleet_api_integration/apis/space_awareness` it's important to have test coverage that entities that should only be accessible in a space are not accessible in a other one. diff --git a/x-pack/platform/plugins/shared/fleet/scripts/verify_test_packages/verify_test_packages.ts b/x-pack/platform/plugins/shared/fleet/scripts/verify_test_packages/verify_test_packages.ts index fa4afe4c7d47e..954fae305c290 100644 --- a/x-pack/platform/plugins/shared/fleet/scripts/verify_test_packages/verify_test_packages.ts +++ b/x-pack/platform/plugins/shared/fleet/scripts/verify_test_packages/verify_test_packages.ts @@ -22,9 +22,9 @@ import { const readFileAsync = promisify(readFile); export const TEST_PACKAGE_DIRECTORIES = [ - '../../../../../../test/fleet_api_integration/apis/fixtures/bundled_packages', - '../../../../../../test/fleet_api_integration/apis/fixtures/test_packages', - '../../../../../../test/fleet_api_integration/apis/fixtures/package_verification/packages', + '../../../../../test/fleet_api_integration/apis/fixtures/bundled_packages', + '../../../../../test/fleet_api_integration/apis/fixtures/test_packages', + '../../../../../test/fleet_api_integration/apis/fixtures/package_verification/packages', ]; const getAllPathsFromDir = (dir: string): string[] => diff --git a/x-pack/platform/plugins/shared/fleet/server/services/epm/archive/parse.test.ts b/x-pack/platform/plugins/shared/fleet/server/services/epm/archive/parse.test.ts index fb10d4ab88220..29e4d371c30da 100644 --- a/x-pack/platform/plugins/shared/fleet/server/services/epm/archive/parse.test.ts +++ b/x-pack/platform/plugins/shared/fleet/server/services/epm/archive/parse.test.ts @@ -323,10 +323,10 @@ describe('parseAndVerifyArchive', () => { it('should parse package successfully', async () => { const packageInfo: ArchivePackage = await _generatePackageInfoFromPaths( [ - 'x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/docs/README.md', - 'x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/manifest.yml', + 'x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/docs/README.md', + 'x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/manifest.yml', ], - 'x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0' + 'x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0' ); expect(packageInfo).toEqual({ diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/__snapshots__/agent_policy.snap b/x-pack/platform/test/fleet_api_integration/apis/agent_policy/__snapshots__/agent_policy.snap similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agent_policy/__snapshots__/agent_policy.snap rename to x-pack/platform/test/fleet_api_integration/apis/agent_policy/__snapshots__/agent_policy.snap diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts b/x-pack/platform/test/fleet_api_integration/apis/agent_policy/agent_policy.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts rename to x-pack/platform/test/fleet_api_integration/apis/agent_policy/agent_policy.ts diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_datastream_permissions.ts b/x-pack/platform/test/fleet_api_integration/apis/agent_policy/agent_policy_datastream_permissions.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_datastream_permissions.ts rename to x-pack/platform/test/fleet_api_integration/apis/agent_policy/agent_policy_datastream_permissions.ts diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_outputs.ts b/x-pack/platform/test/fleet_api_integration/apis/agent_policy/agent_policy_outputs.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_outputs.ts rename to x-pack/platform/test/fleet_api_integration/apis/agent_policy/agent_policy_outputs.ts diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_root_integrations.ts b/x-pack/platform/test/fleet_api_integration/apis/agent_policy/agent_policy_root_integrations.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_root_integrations.ts rename to x-pack/platform/test/fleet_api_integration/apis/agent_policy/agent_policy_root_integrations.ts diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_with_agents_setup.ts b/x-pack/platform/test/fleet_api_integration/apis/agent_policy/agent_policy_with_agents_setup.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_with_agents_setup.ts rename to x-pack/platform/test/fleet_api_integration/apis/agent_policy/agent_policy_with_agents_setup.ts diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/create_standalone_api_key.ts b/x-pack/platform/test/fleet_api_integration/apis/agent_policy/create_standalone_api_key.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agent_policy/create_standalone_api_key.ts rename to x-pack/platform/test/fleet_api_integration/apis/agent_policy/create_standalone_api_key.ts diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/index.js b/x-pack/platform/test/fleet_api_integration/apis/agent_policy/index.js similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agent_policy/index.js rename to x-pack/platform/test/fleet_api_integration/apis/agent_policy/index.js diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/privileges.ts b/x-pack/platform/test/fleet_api_integration/apis/agent_policy/privileges.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agent_policy/privileges.ts rename to x-pack/platform/test/fleet_api_integration/apis/agent_policy/privileges.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/action_status.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/action_status.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/action_status.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/action_status.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/actions.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/actions.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/actions.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/actions.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/available_versions.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/available_versions.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/available_versions.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/available_versions.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/delete.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/delete.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/delete.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/delete.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/get_agents_by_actions.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/get_agents_by_actions.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/get_agents_by_actions.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/get_agents_by_actions.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/helpers/mock_agentless_api.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/helpers/mock_agentless_api.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/helpers/mock_agentless_api.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/helpers/mock_agentless_api.ts diff --git a/x-pack/platform/test/fleet_api_integration/apis/agents/index.js b/x-pack/platform/test/fleet_api_integration/apis/agents/index.js new file mode 100644 index 0000000000000..7a3a7d2d592ab --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/apis/agents/index.js @@ -0,0 +1,32 @@ +/* + * 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('Agents', () => { + before(async () => { + await setupTestUsers(getService('security')); + }); + loadTestFile(require.resolve('./delete')); + loadTestFile(require.resolve('./list')); + loadTestFile(require.resolve('./unenroll')); + loadTestFile(require.resolve('./actions')); + loadTestFile(require.resolve('./upgrade')); + loadTestFile(require.resolve('./action_status')); + loadTestFile(require.resolve('./reassign')); + loadTestFile(require.resolve('./status')); + loadTestFile(require.resolve('./update')); + loadTestFile(require.resolve('./update_agent_tags')); + loadTestFile(require.resolve('./available_versions')); + loadTestFile(require.resolve('./request_diagnostics')); + loadTestFile(require.resolve('./uploads')); + loadTestFile(require.resolve('./get_agents_by_actions')); + loadTestFile(require.resolve('./privileges')); + loadTestFile(require.resolve('./migrate')); + }); +} diff --git a/x-pack/test/fleet_api_integration/apis/agents/list.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/list.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/list.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/list.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/migrate.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/migrate.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/migrate.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/migrate.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/privileges.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/privileges.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/privileges.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/privileges.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/reassign.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/reassign.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/reassign.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/reassign.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/request_diagnostics.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/request_diagnostics.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/request_diagnostics.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/request_diagnostics.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/services.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/services.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/services.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/services.ts diff --git a/x-pack/platform/test/fleet_api_integration/apis/agents/status.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/status.ts new file mode 100644 index 0000000000000..097a52548db5a --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/apis/agents/status.ts @@ -0,0 +1,366 @@ +/* + * 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 expect from '@kbn/expect'; + +import { INGEST_SAVED_OBJECT_INDEX } from '@kbn/core-saved-objects-server'; + +import { AGENTS_INDEX } from '@kbn/fleet-plugin/common'; +import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const es = getService('es'); + const esArchiver = getService('esArchiver'); + const supertest = getService('supertest'); + + describe('fleet_agents_status', () => { + before(async () => { + await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/fleet/agents'); + await es.create({ + id: 'ingest-agent-policies:policy-inactivity-timeout', + index: INGEST_SAVED_OBJECT_INDEX, + refresh: 'wait_for', + document: { + type: 'ingest-agent-policies', + 'ingest-agent-policies': { + name: 'Test policy', + namespace: 'default', + description: 'Policy with inactivity timeout', + status: 'active', + is_default: true, + monitoring_enabled: ['logs', 'metrics'], + revision: 2, + updated_at: '2020-05-07T19:34:42.533Z', + updated_by: 'system', + inactivity_timeout: 60, + }, + typeMigrationVersion: '7.10.0', + }, + }); + // 2 agents online + await es.update({ + id: 'agent1', + refresh: 'wait_for', + index: AGENTS_INDEX, + doc: { + policy_revision_idx: 1, + last_checkin: new Date().toISOString(), + }, + }); + await es.update({ + id: 'agent2', + refresh: 'wait_for', + index: AGENTS_INDEX, + doc: { + policy_revision_idx: 1, + last_checkin: new Date(Date.now() - 1000 * 60 * 3).toISOString(), // 2m online + }, + }); + // 1 agents offline + await es.update({ + id: 'agent3', + refresh: 'wait_for', + index: AGENTS_INDEX, + doc: { + policy_revision_idx: 1, + last_checkin: new Date(Date.now() - 1000 * 60 * 6).toISOString(), // 6m offline + }, + }); + // 1 agents inactive + await es.update({ + id: 'agent4', + refresh: 'wait_for', + index: AGENTS_INDEX, + doc: { + policy_id: 'policy-inactivity-timeout', + policy_revision_idx: 1, + last_checkin: new Date(Date.now() - 1000 * 60).toISOString(), // policy timeout 1 min + }, + }); + // 1 agents inactive through enrolled_at as no last_checkin + await es.create({ + id: 'agent5', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + active: true, + access_api_key_id: 'api-key-4', + policy_id: 'policy-inactivity-timeout', + type: 'PERMANENT', + local_metadata: { host: { hostname: 'host6' } }, + user_provided_metadata: {}, + enrolled_at: new Date(Date.now() - 1000 * 60).toISOString(), // policy timeout 1 min + }, + }); + + // 1 agent upgrading + await es.create({ + id: 'agent6', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + policy_revision_idx: 1, + last_checkin: new Date().toISOString(), + upgrade_started_at: new Date().toISOString(), + }, + }); + // 1 agent reassigned to a new policy + await es.create({ + id: 'agent7', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + active: true, + access_api_key_id: 'api-key-4', + policy_id: 'policy1', + type: 'PERMANENT', + local_metadata: { host: { hostname: 'host5' } }, + user_provided_metadata: {}, + enrolled_at: '2022-06-21T12:17:25Z', + last_checkin: new Date().toISOString(), + policy_revision_idx: null, + }, + }); + + // 1 agent unenrolled + await es.create({ + id: 'agent8', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + active: false, + access_api_key_id: 'api-key-4', + policy_id: 'policy1', + type: 'PERMANENT', + policy_revision_idx: 1, + local_metadata: { host: { hostname: 'host6' } }, + user_provided_metadata: {}, + enrolled_at: '2022-06-21T12:17:25Z', + unenrolled_at: '2022-06-21T12:29:29Z', + last_checkin: '2022-06-27T12:29:29Z', + }, + }); + // 1 agent error + await es.create({ + id: 'agent9', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + active: true, + access_api_key_id: 'api-key-4', + policy_id: 'policy1', + type: 'PERMANENT', + policy_revision_idx: 1, + local_metadata: { host: { hostname: 'host6' } }, + user_provided_metadata: {}, + enrolled_at: '2022-06-21T12:17:25Z', + last_checkin: new Date().toISOString(), + last_checkin_status: 'ERROR', + }, + }); + // 1 agent degraded (error category) + await es.create({ + id: 'agent10', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + active: true, + access_api_key_id: 'api-key-4', + policy_id: 'policy1', + type: 'PERMANENT', + policy_revision_idx: 1, + local_metadata: { host: { hostname: 'host6' } }, + user_provided_metadata: {}, + enrolled_at: '2022-06-21T12:17:25Z', + last_checkin: new Date().toISOString(), + last_checkin_status: 'DEGRADED', + }, + }); + // 1 agent enrolling, no last_checkin yet + await es.create({ + id: 'agent11', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + active: true, + access_api_key_id: 'api-key-4', + policy_id: 'policy-inactivity-timeout', + type: 'PERMANENT', + policy_revision_idx: 1, + local_metadata: { host: { hostname: 'host6' } }, + user_provided_metadata: {}, + enrolled_at: new Date().toISOString(), + }, + }); + // 1 uninstalled agent + await es.create({ + id: 'agent12', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + active: true, + access_api_key_id: 'api-key-4', + policy_id: 'policy-inactivity-timeout', + type: 'PERMANENT', + policy_revision_idx: 1, + local_metadata: { host: { hostname: 'host6' } }, + user_provided_metadata: {}, + enrolled_at: new Date().toISOString(), + audit_unenrolled_reason: 'uninstall', + }, + }); + // 1 orphaned agent + await es.create({ + id: 'agent13', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + active: true, + access_api_key_id: 'api-key-4', + policy_id: 'policy-inactivity-timeout', + type: 'PERMANENT', + policy_revision_idx: 1, + local_metadata: { host: { hostname: 'host6' } }, + user_provided_metadata: {}, + enrolled_at: new Date().toISOString(), + audit_unenrolled_reason: 'orphaned', + }, + }); + }); + after(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/fleet/agents'); + }); + + it('should return the status of agents', async () => { + const { body: apiResponse } = await supertest.get(`/api/fleet/agent_status`).expect(200); + expect(apiResponse).to.eql({ + results: { + events: 0, + other: 0, + online: 2, + active: 10, + all: 13, + error: 2, + offline: 1, + updating: 3, + inactive: 2, + unenrolled: 1, + orphaned: 1, + uninstalled: 1, + }, + }); + }); + + it('should not perform inactivity check if there are too many agent policies with inactivity timeout', async () => { + // the test server is started with --xpack.fleet.developer.maxAgentPoliciesWithInactivityTimeout=10 + // so we create 11 policies with inactivity timeout then no agents should turn inactive + + const policiesToAdd = new Array(11).fill(0).map((_, i) => `policy-inactivity-timeout-${i}`); + + await Promise.all( + policiesToAdd.map((policyId) => + es.create({ + id: 'ingest-agent-policies:' + policyId, + index: INGEST_SAVED_OBJECT_INDEX, + refresh: 'wait_for', + document: { + type: 'ingest-agent-policies', + 'ingest-agent-policies': { + name: policyId, + namespace: 'default', + description: 'Policy with inactivity timeout', + status: 'active', + is_default: true, + monitoring_enabled: ['logs', 'metrics'], + revision: 2, + updated_at: '2020-05-07T19:34:42.533Z', + updated_by: 'system', + inactivity_timeout: 60, + }, + typeMigrationVersion: '7.10.0', + }, + }) + ) + ); + const { body: apiResponse } = await supertest.get(`/api/fleet/agent_status`).expect(200); + expect(apiResponse).to.eql({ + results: { + events: 0, + other: 0, + online: 3, + active: 12, + all: 13, + error: 2, + offline: 1, + updating: 4, + inactive: 0, + unenrolled: 1, + orphaned: 1, + uninstalled: 1, + }, + }); + }); + + it('should get a list of agent policies by kuery', async () => { + await supertest + .get(`/api/fleet/agent_status?kuery=fleet-agents.status:healthy`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'TEST', + namespace: 'default', + }) + .expect(200); + }); + + it('should return 200 also if the kuery does not have prefix fleet-agents', async () => { + await supertest + .get(`/api/fleet/agent_status?kuery=status:unhealthy`) + .set('kbn-xsrf', 'xxxx') + .expect(200); + }); + + it('with enableStrictKQLValidation should return 400 if passed kuery has non existing parameters', async () => { + await supertest + .get(`/api/fleet/agent_status?kuery=fleet-agents.non_existent_parameter:healthy`) + .set('kbn-xsrf', 'xxxx') + .expect(400); + }); + + it('with enableStrictKQLValidation should return 400 if passed kuery is not correct', async () => { + await supertest + .get(`/api/fleet/agent_status?kuery='test%3A'`) + .set('kbn-xsrf', 'xxxx') + .expect(400); + }); + + it('should return incoming data status for specified agents', async () => { + // force install the system package to override package verification + await supertest + .post(`/api/fleet/epm/packages/system/1.50.0`) + .set('kbn-xsrf', 'xxxx') + .send({ force: true }) + .expect(200); + + const { body: apiResponse1 } = await supertest + .get(`/api/fleet/agent_status/data?agentsIds=agent1&agentsIds=agent2`) + .expect(200); + const { body: apiResponse2 } = await supertest + .get( + `/api/fleet/agent_status/data?agentsIds=agent1&agentsIds=agent2&pkgName=system&pkgVersion=1.50.0` + ) + .expect(200); + expect(apiResponse1).to.eql({ + items: [{ agent1: { data: false } }, { agent2: { data: false } }], + dataPreview: [], + }); + expect(apiResponse2).to.eql({ + items: [{ agent1: { data: false } }, { agent2: { data: false } }], + dataPreview: [], + }); + }); + }); +} diff --git a/x-pack/test/fleet_api_integration/apis/agents/unenroll.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/unenroll.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/unenroll.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/unenroll.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/update.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/update.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/update.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/update.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/update_agent_tags.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/update_agent_tags.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/update_agent_tags.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/update_agent_tags.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/upgrade.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/upgrade.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/upgrade.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/upgrade.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/uploads.ts b/x-pack/platform/test/fleet_api_integration/apis/agents/uploads.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/agents/uploads.ts rename to x-pack/platform/test/fleet_api_integration/apis/agents/uploads.ts diff --git a/x-pack/test/fleet_api_integration/apis/data_streams/index.js b/x-pack/platform/test/fleet_api_integration/apis/data_streams/index.js similarity index 100% rename from x-pack/test/fleet_api_integration/apis/data_streams/index.js rename to x-pack/platform/test/fleet_api_integration/apis/data_streams/index.js diff --git a/x-pack/test/fleet_api_integration/apis/data_streams/list.ts b/x-pack/platform/test/fleet_api_integration/apis/data_streams/list.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/data_streams/list.ts rename to x-pack/platform/test/fleet_api_integration/apis/data_streams/list.ts diff --git a/x-pack/test/fleet_api_integration/apis/download_sources/crud.ts b/x-pack/platform/test/fleet_api_integration/apis/download_sources/crud.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/download_sources/crud.ts rename to x-pack/platform/test/fleet_api_integration/apis/download_sources/crud.ts diff --git a/x-pack/test/fleet_api_integration/apis/download_sources/index.js b/x-pack/platform/test/fleet_api_integration/apis/download_sources/index.js similarity index 100% rename from x-pack/test/fleet_api_integration/apis/download_sources/index.js rename to x-pack/platform/test/fleet_api_integration/apis/download_sources/index.js diff --git a/x-pack/test/fleet_api_integration/apis/enrollment_api_keys/crud.ts b/x-pack/platform/test/fleet_api_integration/apis/enrollment_api_keys/crud.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/enrollment_api_keys/crud.ts rename to x-pack/platform/test/fleet_api_integration/apis/enrollment_api_keys/crud.ts diff --git a/x-pack/test/fleet_api_integration/apis/enrollment_api_keys/privileges.ts b/x-pack/platform/test/fleet_api_integration/apis/enrollment_api_keys/privileges.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/enrollment_api_keys/privileges.ts rename to x-pack/platform/test/fleet_api_integration/apis/enrollment_api_keys/privileges.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/__snapshots__/bulk_get_assets.snap b/x-pack/platform/test/fleet_api_integration/apis/epm/__snapshots__/bulk_get_assets.snap similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/__snapshots__/bulk_get_assets.snap rename to x-pack/platform/test/fleet_api_integration/apis/epm/__snapshots__/bulk_get_assets.snap diff --git a/x-pack/test/fleet_api_integration/apis/epm/bulk_get_assets.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/bulk_get_assets.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/bulk_get_assets.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/bulk_get_assets.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/bulk_install.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/bulk_install.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/bulk_install.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/bulk_install.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/bulk_install_upgrade.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/bulk_install_upgrade.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/bulk_install_upgrade.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/bulk_install_upgrade.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/bulk_uninstall.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/bulk_uninstall.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/bulk_uninstall.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/bulk_uninstall.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/bulk_upgrade.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/bulk_upgrade.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/bulk_upgrade.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/bulk_upgrade.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/custom_ingest_pipeline.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/custom_ingest_pipeline.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/custom_ingest_pipeline.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/custom_ingest_pipeline.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/custom_integrations.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/custom_integrations.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/custom_integrations.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/custom_integrations.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/data_stream.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/data_stream.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/data_stream.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/data_stream.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/data_views.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/data_views.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/data_views.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/data_views.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/delete.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/delete.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/delete.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/delete.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/file.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/file.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/file.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/file.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/final_pipeline.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/final_pipeline.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/final_pipeline.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/final_pipeline.ts diff --git a/x-pack/platform/test/fleet_api_integration/apis/epm/get.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/get.ts new file mode 100644 index 0000000000000..c6ed1455c3d5d --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/apis/epm/get.ts @@ -0,0 +1,307 @@ +/* + * 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 expect from '@kbn/expect'; +import { PackageInfo } from '@kbn/fleet-plugin/common/types/models/epm'; +import fs from 'fs'; +import path from 'path'; +import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; +import { skipIfNoDockerRegistry } from '../../helpers'; +import { testUsers } from '../test_users'; +import { bundlePackage, removeBundledPackages } from './install_bundled'; + +export default function (providerContext: FtrProviderContext) { + const { getService } = providerContext; + + const supertest = getService('supertest'); + const es = getService('es'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const fleetAndAgents = getService('fleetAndAgents'); + + const testPkgName = 'apache'; + const testPkgVersion = '0.1.4'; + const log = getService('log'); + + const uninstallPackage = async (name: string, version: string) => { + await supertest.delete(`/api/fleet/epm/packages/${name}/${version}`).set('kbn-xsrf', 'xxxx'); + }; + const installPackage = async (name: string, version: string) => { + await supertest + .post(`/api/fleet/epm/packages/${name}/${version}`) + .set('kbn-xsrf', 'xxxx') + .send({ force: true }); + }; + + const testPkgArchiveZip = path.join( + path.dirname(__filename), + '../fixtures/direct_upload_packages/apache_0.1.4.zip' + ); + + async function uploadPackage(zipPackage: string) { + // wait 10s before uploading again to avoid getting 429 + await new Promise((resolve) => setTimeout(resolve, 10000)); + const buf = fs.readFileSync(zipPackage); + return await supertest + .post(`/api/fleet/epm/packages`) + .set('kbn-xsrf', 'xxxx') + .type('application/zip') + .send(buf) + .expect(200); + } + + describe('EPM - get', () => { + skipIfNoDockerRegistry(providerContext); + + before(async () => { + await fleetAndAgents.setup(); + }); + + it('returns package info from the registry if it was installed from the registry', async function () { + // this will install through the registry by default + await installPackage(testPkgName, testPkgVersion); + const res = await supertest + .get(`/api/fleet/epm/packages/${testPkgName}/${testPkgVersion}`) + .expect(200); + const packageInfo = res.body.item; + // the uploaded version will have this description + expect(packageInfo.description).to.not.equal('Apache Uploaded Test Integration'); + // download property should exist + expect(packageInfo.download).to.not.equal(undefined); + await uninstallPackage(testPkgName, testPkgVersion); + }); + + it('returns correct package info if it was installed by upload', async function () { + await uploadPackage(testPkgArchiveZip); + + const res = await supertest + .get(`/api/fleet/epm/packages/${testPkgName}/${testPkgVersion}`) + .expect(200); + const packageInfo = res.body.item; + // Get package info always return data from the registry + expect(packageInfo.description).to.not.equal('Apache Uploaded Test Integration'); + // download property exist on uploaded packages + expect(packageInfo.download).to.not.equal(undefined); + await uninstallPackage(testPkgName, testPkgVersion); + }); + + it('returns correct package info from registry if a different version is installed by upload', async function () { + await uploadPackage(testPkgArchiveZip); + + const res = await supertest.get(`/api/fleet/epm/packages/apache/0.1.3`).expect(200); + const packageInfo = res.body.item; + expect(packageInfo.description).to.equal('Apache Integration'); + expect(packageInfo.download).to.not.equal(undefined); + await uninstallPackage(testPkgName, testPkgVersion); + }); + + it('returns correct package info from upload if a uploaded version is not in registry', async function () { + const testPkgArchiveZipV9999 = path.join( + path.dirname(__filename), + '../fixtures/direct_upload_packages/apache_9999.0.0.zip' + ); + await uploadPackage(testPkgArchiveZipV9999); + + const res = await supertest.get(`/api/fleet/epm/packages/apache/9999.0.0`).expect(200); + const packageInfo = res.body.item; + expect(packageInfo.description).to.equal('Apache Uploaded Test Integration'); + expect(packageInfo.download).to.equal(undefined); + await uninstallPackage(testPkgName, '9999.0.0'); + }); + + describe('Installed Packages', () => { + before(async () => { + await installPackage(testPkgName, testPkgVersion); + await installPackage('experimental', '0.1.0'); + await bundlePackage('endpoint-8.6.1'); + await installPackage('endpoint', '8.6.1'); + await es.index({ + index: 'logs-apache.access-default', + document: { + '@timestamp': new Date().toISOString(), + }, + refresh: 'wait_for', + }); + }); + after(async () => { + await uninstallPackage(testPkgName, testPkgVersion); + await uninstallPackage('experimental', '0.1.0'); + await uninstallPackage('endpoint', '8.6.1'); + await removeBundledPackages(log); + await es.indices.deleteDataStream({ + name: 'logs-apache.access-default', + }); + }); + it('Allows the fetching of installed packages', async () => { + const res = await supertest.get(`/api/fleet/epm/packages/installed`).expect(200); + const packages = res.body.items; + const packageNames = packages.map((pkg: any) => pkg.name); + expect(packageNames).to.contain('apache'); + expect(packageNames).to.contain('endpoint'); + expect(packageNames).to.contain('experimental'); + expect(packageNames.length).to.be(3); + }); + it('Can be limited with perPage', async () => { + const res = await supertest.get(`/api/fleet/epm/packages/installed?perPage=2`).expect(200); + const packages = res.body.items; + expect(packages.length).to.be(2); + }); + it('Can be queried by dataStreamType', async () => { + const res = await supertest + .get(`/api/fleet/epm/packages/installed?dataStreamType=metrics`) + .expect(200); + const packages = res.body.items; + let dataStreams = [] as any; + packages.forEach((packageItem: any) => { + dataStreams = dataStreams.concat(packageItem.dataStreams); + }); + const streamsWithWrongType = dataStreams.filter((stream: any) => { + return !stream.name.startsWith('metrics-'); + }); + expect(streamsWithWrongType.length).to.be(0); + }); + it('Can be sorted', async () => { + const ascRes = await supertest + .get(`/api/fleet/epm/packages/installed?sortOrder=asc`) + .expect(200); + const ascPackages = ascRes.body.items; + expect(ascPackages[0].name).to.be('apache'); + + const descRes = await supertest + .get(`/api/fleet/epm/packages/installed?sortOrder=desc`) + .expect(200); + const descPackages = descRes.body.items; + expect(descPackages[0].name).to.be('experimental'); + }); + it('Can be filtered by name', async () => { + const res = await supertest + .get(`/api/fleet/epm/packages/installed?nameQuery=experimental`) + .expect(200); + const packages = res.body.items; + expect(packages.length).to.be(1); + expect(packages[0].name).to.be('experimental'); + }); + it('Can be to only return active datastreams', async () => { + const res = await supertest + .get(`/api/fleet/epm/packages/installed?nameQuery=apache&showOnlyActiveDataStreams=true`) + .expect(200); + const packages = res.body.items; + expect(packages.length).to.be(1); + expect(packages[0].name).to.be('apache'); + expect(packages[0].dataStreams.length).to.be(1); + expect(packages[0].dataStreams[0].name).to.be('logs-apache.access-*'); + }); + }); + it('rejects user does not have access to data streams', async function () { + const response = await supertestWithoutAuth + .get(`/api/fleet/epm/packages/installed?showOnlyActiveDataStreams=true`) + .auth(testUsers.fleet_all_int_all.username, testUsers.fleet_all_int_all.password) + .expect(403); + expect(response.body.message).to.contain('Unauthorized to query fleet datastreams'); + }); + it('returns a 404 for a package that do not exists', async function () { + await supertest.get('/api/fleet/epm/packages/notexists/99.99.99').expect(404); + }); + + it('returns a 400 for a package key without a proper semver version', async function () { + await supertest.get('/api/fleet/epm/packages/endpoint/0.1.0.1.2.3').expect(400); + }); + + it('allows user with only fleet permission to access', async () => { + await supertestWithoutAuth + .get(`/api/fleet/epm/packages/${testPkgName}/${testPkgVersion}`) + .auth(testUsers.fleet_all_only.username, testUsers.fleet_all_only.password) + .expect(200); + }); + it('allows user with only integrations permission to access', async () => { + await supertestWithoutAuth + .get(`/api/fleet/epm/packages/${testPkgName}/${testPkgVersion}`) + .auth(testUsers.integr_all_only.username, testUsers.integr_all_only.password) + .expect(200); + }); + it('allows user with integrations read permission to access', async () => { + await supertestWithoutAuth + .get(`/api/fleet/epm/packages/${testPkgName}/${testPkgVersion}`) + .auth(testUsers.fleet_all_int_read.username, testUsers.fleet_all_int_read.password) + .expect(200); + }); + + it('returns package info in item field when calling without version', async function () { + // this will install through the registry by default + await installPackage(testPkgName, testPkgVersion); + const res = await supertest + .get(`/api/fleet/epm/packages/${testPkgName}`) + .set('kbn-xsrf', 'xxxx') + .expect(200); + const packageInfo = res.body.item; + // the uploaded version will have this description + expect(packageInfo.name).to.equal('apache'); + await uninstallPackage(testPkgName, testPkgVersion); + }); + it('should return all fields for input only packages', async function () { + // input packages have to get their package info from the manifest directly + // not from the package registry. This is because they contain a field the registry + // does not support + const res = await supertest + .get(`/api/fleet/epm/packages/integration_to_input/2.0.0`) + .expect(200); + + const packageInfo = res.body.item; + expect(packageInfo.policy_templates.length).to.equal(1); + expect(packageInfo.policy_templates[0].vars).not.to.be(undefined); + }); + describe('Pkg verification', () => { + it('should return validation error for unverified input only pkg', async function () { + const res = await supertest + .get(`/api/fleet/epm/packages/input_only/0.1.0?prerelease=true`) + .expect(400); + const error = res.body; + + expect(error?.attributes?.type).to.equal('verification_failed'); + }); + it('should not return validation error for unverified input only pkg if ignoreUnverified is true', async function () { + await supertest + .get(`/api/fleet/epm/packages/input_only/0.1.0?ignoreUnverified=true&prerelease=true`) + .expect(200); + }); + }); + it('returns package info from the archive if ?full=true', async function () { + const res = await supertest + .get(`/api/fleet/epm/packages/non_epr_fields/1.0.0?full=true`) + .expect(200); + const packageInfo = res.body.item as PackageInfo; + expect(packageInfo?.data_streams?.length).equal(3); + const dataStream = packageInfo?.data_streams?.find( + ({ dataset }) => dataset === 'non_epr_fields.test_metrics_2' + ); + expect(dataStream?.elasticsearch?.source_mode).equal('default'); + }); + it('returns package info from the registry if ?full=false', async function () { + const res = await supertest + .get(`/api/fleet/epm/packages/non_epr_fields/1.0.0?full=false`) + .expect(200); + const packageInfo = res.body.item as PackageInfo; + expect(packageInfo?.data_streams?.length).equal(3); + const dataStream = packageInfo?.data_streams?.find( + ({ dataset }) => dataset === 'non_epr_fields.test_metrics_2' + ); + // this field is only returned if we go to the archive + // it is not part of the EPR API + expect(dataStream?.elasticsearch?.source_mode).equal(undefined); + }); + it('returns package info from the registry if ?full not provided', async function () { + const res = await supertest + .get(`/api/fleet/epm/packages/non_epr_fields/1.0.0?full=false`) + .expect(200); + const packageInfo = res.body.item as PackageInfo; + expect(packageInfo?.data_streams?.length).equal(3); + const dataStream = packageInfo?.data_streams?.find( + ({ dataset }) => dataset === 'non_epr_fields.test_metrics_2' + ); + expect(dataStream?.elasticsearch?.source_mode).equal(undefined); + }); + }); +} diff --git a/x-pack/test/fleet_api_integration/apis/epm/get_templates_inputs.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/get_templates_inputs.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/get_templates_inputs.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/get_templates_inputs.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/ilm.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/ilm.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/ilm.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/ilm.ts diff --git a/x-pack/platform/test/fleet_api_integration/apis/epm/index.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/index.ts new file mode 100644 index 0000000000000..4c36ec37a6f6e --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/apis/epm/index.ts @@ -0,0 +1,58 @@ +/* + * 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'; +import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; + +export default function ({ loadTestFile, getService }: FtrProviderContext) { + describe('EPM Endpoints', () => { + before(async () => { + await setupTestUsers(getService('security')); + }); + loadTestFile(require.resolve('./delete')); + loadTestFile(require.resolve('./list')); + loadTestFile(require.resolve('./setup')); + loadTestFile(require.resolve('./get')); + loadTestFile(require.resolve('./file')); + loadTestFile(require.resolve('./template')); + loadTestFile(require.resolve('./ilm')); + loadTestFile(require.resolve('./install_bundled')); + loadTestFile(require.resolve('./install_by_upload')); + loadTestFile(require.resolve('./install_custom')); + loadTestFile(require.resolve('./install_endpoint')); + loadTestFile(require.resolve('./install_overrides')); + loadTestFile(require.resolve('./install_prerelease')); + loadTestFile(require.resolve('./install_remove_assets')); + loadTestFile(require.resolve('./install_remove_kbn_assets_in_space')); + loadTestFile(require.resolve('./install_remove_multiple')); + loadTestFile(require.resolve('./install_update')); + loadTestFile(require.resolve('./install_tsds_disable')); + loadTestFile(require.resolve('./install_tag_assets')); + loadTestFile(require.resolve('./install_with_streaming')); + loadTestFile(require.resolve('./bulk_upgrade')); + loadTestFile(require.resolve('./bulk_uninstall')); + loadTestFile(require.resolve('./bulk_install_upgrade')); + loadTestFile(require.resolve('./bulk_install')); + loadTestFile(require.resolve('./update_assets')); + loadTestFile(require.resolve('./data_stream')); + loadTestFile(require.resolve('./package_install_complete')); + loadTestFile(require.resolve('./remove_legacy_templates')); + loadTestFile(require.resolve('./install_error_rollback')); + loadTestFile(require.resolve('./final_pipeline')); + loadTestFile(require.resolve('./custom_ingest_pipeline')); + loadTestFile(require.resolve('./verification_key_id')); + loadTestFile(require.resolve('./install_integration_in_multiple_spaces.ts')); + loadTestFile(require.resolve('./install_hidden_datastreams')); + loadTestFile(require.resolve('./bulk_get_assets')); + loadTestFile(require.resolve('./install_dynamic_template_metric')); + loadTestFile(require.resolve('./routing_rules')); + loadTestFile(require.resolve('./install_runtime_field')); + loadTestFile(require.resolve('./get_templates_inputs')); + loadTestFile(require.resolve('./data_views')); + loadTestFile(require.resolve('./custom_integrations')); + }); +} diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_bundled.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_bundled.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_bundled.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_bundled.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_by_upload.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_by_upload.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_custom.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_custom.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_custom.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_custom.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_dynamic_template_metric.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_dynamic_template_metric.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_dynamic_template_metric.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_dynamic_template_metric.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_endpoint.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_endpoint.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_endpoint.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_endpoint.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_error_rollback.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_error_rollback.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_error_rollback.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_error_rollback.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_hidden_datastreams.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_hidden_datastreams.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_hidden_datastreams.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_hidden_datastreams.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_integration_in_multiple_spaces.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_integration_in_multiple_spaces.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_integration_in_multiple_spaces.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_integration_in_multiple_spaces.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_overrides.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_overrides.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_overrides.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_overrides.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_prerelease.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_prerelease.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_prerelease.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_prerelease.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_remove_assets.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_remove_assets.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_remove_assets.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_remove_assets.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_remove_kbn_assets_in_space.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_remove_kbn_assets_in_space.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_remove_kbn_assets_in_space.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_remove_kbn_assets_in_space.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_remove_multiple.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_remove_multiple.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_remove_multiple.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_remove_multiple.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_runtime_field.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_runtime_field.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_runtime_field.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_runtime_field.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_tag_assets.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_tag_assets.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_tag_assets.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_tag_assets.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_tsds_disable.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_tsds_disable.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_tsds_disable.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_tsds_disable.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_update.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_update.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_update.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_update.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_with_signature_verification.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_with_signature_verification.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_with_signature_verification.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_with_signature_verification.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_with_streaming.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/install_with_streaming.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/install_with_streaming.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/install_with_streaming.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/list.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/list.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/list.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/list.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/package_install_complete.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/package_install_complete.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/package_install_complete.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/package_install_complete.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/remove_legacy_templates.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/remove_legacy_templates.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/remove_legacy_templates.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/remove_legacy_templates.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/routing_rules.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/routing_rules.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/routing_rules.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/routing_rules.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/setup.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/setup.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/setup.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/setup.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/template.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/template.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/template.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/template.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/update_assets.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/update_assets.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/update_assets.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/update_assets.ts diff --git a/x-pack/test/fleet_api_integration/apis/epm/verification_key_id.ts b/x-pack/platform/test/fleet_api_integration/apis/epm/verification_key_id.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/epm/verification_key_id.ts rename to x-pack/platform/test/fleet_api_integration/apis/epm/verification_key_id.ts diff --git a/x-pack/test/fleet_api_integration/apis/event_ingested/index.js b/x-pack/platform/test/fleet_api_integration/apis/event_ingested/index.js similarity index 100% rename from x-pack/test/fleet_api_integration/apis/event_ingested/index.js rename to x-pack/platform/test/fleet_api_integration/apis/event_ingested/index.js diff --git a/x-pack/test/fleet_api_integration/apis/event_ingested/use_event_ingested.ts b/x-pack/platform/test/fleet_api_integration/apis/event_ingested/use_event_ingested.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/event_ingested/use_event_ingested.ts rename to x-pack/platform/test/fleet_api_integration/apis/event_ingested/use_event_ingested.ts diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/bundled_packages/endpoint-8.6.1.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/bundled_packages/endpoint-8.6.1.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/bundled_packages/endpoint-8.6.1.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/bundled_packages/endpoint-8.6.1.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/bundled_packages/nginx-1.1.0.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/bundled_packages/nginx-1.1.0.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/bundled_packages/nginx-1.1.0.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/bundled_packages/nginx-1.1.0.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/bundled_packages/nginx-1.2.1.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/bundled_packages/nginx-1.2.1.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/bundled_packages/nginx-1.2.1.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/bundled_packages/nginx-1.2.1.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/agent/stream/log.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/agent/stream/log.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/agent/stream/log.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/agent/stream/log.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/elasticsearch/ingest_pipeline/default.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/elasticsearch/ingest_pipeline/default.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/elasticsearch/ingest_pipeline/default.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/elasticsearch/ingest_pipeline/default.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/base-fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/base-fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/base-fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/base-fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/agent/stream/log.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/agent/stream/log.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/agent/stream/log.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/agent/stream/log.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/elasticsearch/ingest_pipeline/default.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/elasticsearch/ingest_pipeline/default.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/elasticsearch/ingest_pipeline/default.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/elasticsearch/ingest_pipeline/default.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/base-fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/base-fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/base-fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/base-fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/base-fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/base-fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/base-fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/base-fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/sample_event.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/sample_event.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/sample_event.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/sample_event.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/apache_httpd_server_status.png b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/apache_httpd_server_status.png similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/apache_httpd_server_status.png rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/apache_httpd_server_status.png diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/kibana-apache.png b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/kibana-apache.png similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/kibana-apache.png rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/kibana-apache.png diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/logo_apache.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/logo_apache.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/logo_apache.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/logo_apache.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Logs-Apache-Dashboard-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Logs-Apache-Dashboard-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Logs-Apache-Dashboard-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Logs-Apache-Dashboard-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Metrics-Apache-HTTPD-server-status-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Metrics-Apache-HTTPD-server-status-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Metrics-Apache-HTTPD-server-status-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Metrics-Apache-HTTPD-server-status-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-HTTPD-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-HTTPD-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-HTTPD-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-HTTPD-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-access-logs-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-access-logs-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-access-logs-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-access-logs-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-errors-log-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-errors-log-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-errors-log-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-errors-log-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-CPU-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-CPU-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-CPU-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-CPU-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Hostname-list-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Hostname-list-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Hostname-list-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Hostname-list-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Load1-slash-5-slash-15-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Load1-slash-5-slash-15-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Load1-slash-5-slash-15-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Load1-slash-5-slash-15-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Scoreboard-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Scoreboard-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Scoreboard-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Scoreboard-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Total-accesses-and-kbytes-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Total-accesses-and-kbytes-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Total-accesses-and-kbytes-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Total-accesses-and-kbytes-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Uptime-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Uptime-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Uptime-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Uptime-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Workers-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Workers-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Workers-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Workers-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-access-unique-IPs-map-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-access-unique-IPs-map-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-access-unique-IPs-map-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-access-unique-IPs-map-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-browsers-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-browsers-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-browsers-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-browsers-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-error-logs-over-time-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-error-logs-over-time-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-error-logs-over-time-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-error-logs-over-time-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-operating-systems-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-operating-systems-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-operating-systems-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-operating-systems-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-of-top-URLs-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-of-top-URLs-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-of-top-URLs-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-of-top-URLs-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-over-time-ecs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-over-time-ecs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-over-time-ecs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-over-time-ecs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.5.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.5.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.5.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.5.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.tar.gz b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.tar.gz similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.tar.gz rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.tar.gz diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_9999.0.0.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_9999.0.0.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_9999.0.0.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_9999.0.0.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_invalid_yaml_0.1.4.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_invalid_yaml_0.1.4.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_invalid_yaml_0.1.4.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_invalid_yaml_0.1.4.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_missing_field_0.1.4.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_missing_field_0.1.4.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_missing_field_0.1.4.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_missing_field_0.1.4.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_no_manifest_0.1.4.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_no_manifest_0.1.4.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_no_manifest_0.1.4.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_no_manifest_0.1.4.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_toplevel_mismatch_0.1.4.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_toplevel_mismatch_0.1.4.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_toplevel_mismatch_0.1.4.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_toplevel_mismatch_0.1.4.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_two_toplevels_0.1.4.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_two_toplevels_0.1.4.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_two_toplevels_0.1.4.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_two_toplevels_0.1.4.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/assets_with_tags-0.1.0.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/assets_with_tags-0.1.0.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/assets_with_tags-0.1.0.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/assets_with_tags-0.1.0.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/assets_with_tags-0.1.1.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/assets_with_tags-0.1.1.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/assets_with_tags-0.1.1.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/direct_upload_packages/assets_with_tags-0.1.1.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_registry_config.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_registry_config.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_registry_config.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_registry_config.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/agent/input/input.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/agent/input/input.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/agent/input/input.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/agent/input/input.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/changelog.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/changelog.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/changelog.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/changelog.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/fields/input.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/fields/input.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/fields/input.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/fields/input.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/img/sample-logo.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/img/sample-logo.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/img/sample-logo.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/img/sample-logo.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/img/sample-screenshot.png b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/img/sample-screenshot.png similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/img/sample-screenshot.png rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/img/sample-screenshot.png diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/input_only-0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/changelog.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/changelog.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/changelog.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/changelog.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/fields/agent.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/fields/agent.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/fields/agent.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/fields/agent.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/fields/base-fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/fields/base-fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/fields/base-fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/fields/base-fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/data_stream/log/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/img/icon.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/img/icon.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/img/icon.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/img/icon.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/unverified_content-1.0.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/changelog.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/changelog.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/changelog.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/changelog.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/fields/agent.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/fields/agent.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/fields/agent.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/fields/agent.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/fields/base-fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/fields/base-fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/fields/base-fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/fields/base-fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/data_stream/log/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/img/icon.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/img/icon.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/img/icon.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/img/icon.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/verified-1.0.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/changelog.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/changelog.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/changelog.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/changelog.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/fields/agent.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/fields/agent.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/fields/agent.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/fields/agent.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/fields/base-fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/fields/base-fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/fields/base-fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/fields/base-fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/data_stream/log/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/img/icon.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/img/icon.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/img/icon.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/img/icon.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/src/wrong_key-1.0.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/input_only_unverified-0.1.0.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/input_only_unverified-0.1.0.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/input_only_unverified-0.1.0.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/input_only_unverified-0.1.0.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/input_only_unverified-0.1.0.zip.sig b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/input_only_unverified-0.1.0.zip.sig similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/input_only_unverified-0.1.0.zip.sig rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/input_only_unverified-0.1.0.zip.sig diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/unverified_content-1.0.0.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/unverified_content-1.0.0.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/unverified_content-1.0.0.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/unverified_content-1.0.0.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/unverified_content-1.0.0.zip.sig b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/unverified_content-1.0.0.zip.sig similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/unverified_content-1.0.0.zip.sig rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/unverified_content-1.0.0.zip.sig diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/verified-1.0.0.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/verified-1.0.0.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/verified-1.0.0.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/verified-1.0.0.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/verified-1.0.0.zip.sig b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/verified-1.0.0.zip.sig similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/verified-1.0.0.zip.sig rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/verified-1.0.0.zip.sig diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/wrong_key-1.0.0.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/wrong_key-1.0.0.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/wrong_key-1.0.0.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/wrong_key-1.0.0.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/wrong_key-1.0.0.zip.sig b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/wrong_key-1.0.0.zip.sig similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/wrong_key-1.0.0.zip.sig rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/packages/zips/wrong_key-1.0.0.zip.sig diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/signatures/fleet_test_key_private.asc b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/signatures/fleet_test_key_private.asc similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/signatures/fleet_test_key_private.asc rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/signatures/fleet_test_key_private.asc diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/package_verification/signatures/fleet_test_key_public.asc b/x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/signatures/fleet_test_key_public.asc similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/package_verification/signatures/fleet_test_key_public.asc rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/package_verification/signatures/fleet_test_key_public.asc diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/pipeline1.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/pipeline1.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/pipeline1.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/pipeline1.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/pipeline2.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/pipeline2.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/pipeline2.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/pipeline2.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_logs/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/elasticsearch/ilm_policy/all_assets.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/elasticsearch/ilm_policy/all_assets.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/elasticsearch/ilm_policy/all_assets.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/elasticsearch/ilm_policy/all_assets.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/data_stream/test_metrics/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/elasticsearch/ml_model/test/default.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/elasticsearch/ml_model/test/default.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/elasticsearch/ml_model/test/default.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/elasticsearch/ml_model/test/default.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/img/logo_overrides_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/img/logo_overrides_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/img/logo_overrides_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/img/logo_overrides_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/csp_rule_template/sample_csp_rule_template.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/csp_rule_template/sample_csp_rule_template.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/csp_rule_template/sample_csp_rule_template.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/csp_rule_template/sample_csp_rule_template.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/dashboard/sample_dashboard.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/dashboard/sample_dashboard.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/dashboard/sample_dashboard.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/dashboard/sample_dashboard.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/dashboard/sample_dashboard2.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/dashboard/sample_dashboard2.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/dashboard/sample_dashboard2.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/dashboard/sample_dashboard2.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/index_pattern/invalid.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/index_pattern/invalid.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/index_pattern/invalid.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/index_pattern/invalid.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/index_pattern/test_index_pattern.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/index_pattern/test_index_pattern.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/index_pattern/test_index_pattern.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/index_pattern/test_index_pattern.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/lens/sample_lens.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/lens/sample_lens.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/lens/sample_lens.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/lens/sample_lens.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/ml_module/sample_ml_module.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/ml_module/sample_ml_module.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/ml_module/sample_ml_module.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/ml_module/sample_ml_module.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/osquery_pack_asset/sample_osquery_pack_asset.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/osquery_pack_asset/sample_osquery_pack_asset.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/osquery_pack_asset/sample_osquery_pack_asset.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/osquery_pack_asset/sample_osquery_pack_asset.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/osquery_saved_query/sample_osquery_saved_query.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/osquery_saved_query/sample_osquery_saved_query.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/osquery_saved_query/sample_osquery_saved_query.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/osquery_saved_query/sample_osquery_saved_query.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/search/sample_search.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/search/sample_search.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/search/sample_search.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/search/sample_search.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/security_ai_prompt/sample_security_ai_prompts.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/security_ai_prompt/sample_security_ai_prompts.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/security_ai_prompt/sample_security_ai_prompts.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/security_ai_prompt/sample_security_ai_prompts.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/security_rule/sample_security_rule.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/security_rule/sample_security_rule.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/security_rule/sample_security_rule.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/security_rule/sample_security_rule.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/tag/sample_tag.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/tag/sample_tag.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/tag/sample_tag.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/tag/sample_tag.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/visualization/sample_visualization.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/visualization/sample_visualization.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/visualization/sample_visualization.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/kibana/visualization/sample_visualization.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/elasticsearch/ingest_pipeline/pipeline1.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/elasticsearch/ingest_pipeline/pipeline1.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/elasticsearch/ingest_pipeline/pipeline1.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/elasticsearch/ingest_pipeline/pipeline1.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs2/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs2/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs2/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs2/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs2/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs2/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs2/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs2/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs2/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs2/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs2/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_logs2/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_metrics/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_metrics/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_metrics/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_metrics/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_metrics/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_metrics/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_metrics/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_metrics/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_metrics/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_metrics/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_metrics/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/data_stream/test_metrics/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/elasticsearch/ml_model/test/default.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/elasticsearch/ml_model/test/default.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/elasticsearch/ml_model/test/default.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/elasticsearch/ml_model/test/default.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/img/logo_overrides_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/img/logo_overrides_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/img/logo_overrides_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/img/logo_overrides_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/csp_rule_template/sample_csp_rule_template.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/csp_rule_template/sample_csp_rule_template.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/csp_rule_template/sample_csp_rule_template.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/csp_rule_template/sample_csp_rule_template.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/dashboard/sample_dashboard.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/dashboard/sample_dashboard.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/dashboard/sample_dashboard.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/dashboard/sample_dashboard.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/lens/sample_lens.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/lens/sample_lens.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/lens/sample_lens.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/lens/sample_lens.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/ml_module/sample_ml_module.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/ml_module/sample_ml_module.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/ml_module/sample_ml_module.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/ml_module/sample_ml_module.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/osquery_pack_asset/sample_osquery_pack_asset.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/osquery_pack_asset/sample_osquery_pack_asset.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/osquery_pack_asset/sample_osquery_pack_asset.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/osquery_pack_asset/sample_osquery_pack_asset.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/osquery_saved_query/sample_osquery_saved_query.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/osquery_saved_query/sample_osquery_saved_query.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/osquery_saved_query/sample_osquery_saved_query.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/osquery_saved_query/sample_osquery_saved_query.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/search/sample_search2.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/search/sample_search2.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/search/sample_search2.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/search/sample_search2.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/security_ai_prompt/sample_security_ai_prompts.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/security_ai_prompt/sample_security_ai_prompts.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/security_ai_prompt/sample_security_ai_prompts.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/security_ai_prompt/sample_security_ai_prompts.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/security_rule/sample_security_rule.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/security_rule/sample_security_rule.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/security_rule/sample_security_rule.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/security_rule/sample_security_rule.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/tag/sample_tag.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/tag/sample_tag.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/tag/sample_tag.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/tag/sample_tag.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/visualization/sample_visualization.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/visualization/sample_visualization.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/visualization/sample_visualization.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/kibana/visualization/sample_visualization.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/all_assets/0.2.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/apm/apm-8.7.0.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/apm/apm-8.7.0.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/apm/apm-8.7.0.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/apm/apm-8.7.0.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/apm/apm-8.8.0.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/apm/apm-8.8.0.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/apm/apm-8.8.0.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/apm/apm-8.8.0.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/auditd_manager/auditd_manager-1.16.3.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/auditd_manager/auditd_manager-1.16.3.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/auditd_manager/auditd_manager-1.16.3.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/auditd_manager/auditd_manager-1.16.3.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_logs/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_metrics/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_metrics/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_metrics/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_metrics/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_metrics/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_metrics/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_metrics/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_metrics/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_metrics/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_metrics/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_metrics/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/data_stream/test_metrics/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/elasticsearch/ilm_policy/all_assets.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/elasticsearch/ingest_pipeline/default.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_logs/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_metrics/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_metrics/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_metrics/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_metrics/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_metrics/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_metrics/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_metrics/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_metrics/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_metrics/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_metrics/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_metrics/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/data_stream/test_metrics/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/datastreams/0.2.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/data_stream/test/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/data_stream/test/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/data_stream/test/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/data_stream/test/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/data_stream/test/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/data_stream/test/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/data_stream/test/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/data_stream/test/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/deprecated/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/agent/stream/log.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/agent/stream/log.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/agent/stream/log.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/agent/stream/log.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_logs/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/agent/stream/cpu.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/agent/stream/cpu.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/agent/stream/cpu.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/agent/stream/cpu.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/data_stream/test_metrics/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/dynamic_datastream/1.2.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/endpoint/endpoint-8.6.1.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/endpoint/endpoint-8.6.1.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/endpoint/endpoint-8.6.1.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/endpoint/endpoint-8.6.1.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/img/logo_overrides_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/img/logo_overrides_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/img/logo_overrides_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/img/logo_overrides_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/kibana/visualization/sample_visualization.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/kibana/visualization/sample_visualization.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/kibana/visualization/sample_visualization.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/kibana/visualization/sample_visualization.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/img/logo_overrides_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/img/logo_overrides_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/img/logo_overrides_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/img/logo_overrides_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/kibana/visualization/sample_visualization.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/kibana/visualization/sample_visualization.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/kibana/visualization/sample_visualization.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/kibana/visualization/sample_visualization.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.2.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/img/logo_overrides_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/img/logo_overrides_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/img/logo_overrides_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/img/logo_overrides_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/kibana/visualization/sample_visualization.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/kibana/visualization/sample_visualization.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/kibana/visualization/sample_visualization.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/kibana/visualization/sample_visualization.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/error_handling/0.3.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_logs/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_logs/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_logs/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_logs/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_logs/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_logs/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_logs/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_logs/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_logs/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_logs/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_logs/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_logs/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_metrics/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_metrics/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_metrics/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_metrics/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_metrics/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_metrics/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_metrics/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_metrics/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_metrics/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_metrics/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_metrics/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/data_stream/test_metrics/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/img/logo_overrides_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/img/logo_overrides_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/img/logo_overrides_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/img/logo_overrides_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_logs/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_logs/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_logs/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_logs/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_logs/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_logs/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_logs/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_logs/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_logs/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_logs/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_logs/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_logs/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_metrics/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_metrics/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_metrics/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_metrics/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_metrics/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_metrics/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_metrics/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_metrics/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_metrics/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_metrics/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_metrics/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/data_stream/test_metrics/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/img/logo_overrides_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/img/logo_overrides_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/img/logo_overrides_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/img/logo_overrides_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/experimental2/0.1.0/manifest.yml diff --git a/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/docs/README.md new file mode 100644 index 0000000000000..e0c6f30fefce9 --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/docs/README.md @@ -0,0 +1,5 @@ +# filetest + +This package contains randomly collected files from other packages to be used in API integration tests. + +It also serves as an example how to serve a package from the fixtures directory with the package registry docker container. For this, also see the `x-pack/platform/test/fleet_api_integration/config.ts` how the `test_packages` directory is mounted into the docker container, and `x-pack/platform/test/fleet_api_integration/apis/fixtures/package_registry_config.yml` how to pass the directory to the registry. diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/img/logo.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/img/logo.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/img/logo.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/img/logo.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/img/screenshots/metricbeat_dashboard.png b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/img/screenshots/metricbeat_dashboard.png similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/img/screenshots/metricbeat_dashboard.png rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/img/screenshots/metricbeat_dashboard.png diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/dashboard/sample_dashboard.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/dashboard/sample_dashboard.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/dashboard/sample_dashboard.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/dashboard/sample_dashboard.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/search/all_logs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/search/all_logs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/search/all_logs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/search/all_logs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/search/ecs_logs.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/search/ecs_logs.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/search/ecs_logs.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/search/ecs_logs.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/search/sample_search.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/search/sample_search.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/search/sample_search.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/search/sample_search.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_0.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_0.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_0.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_0.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_1.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_1.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_1.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_1.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_2.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_2.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_2.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_2.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_3.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_3.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_3.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/panel_3.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/sample_visualization.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/sample_visualization.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/sample_visualization.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/kibana/visualization/sample_visualization.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/changelog.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/changelog.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/changelog.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/changelog.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/img/kibana-system.png b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/img/kibana-system.png similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/img/kibana-system.png rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/img/kibana-system.png diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/img/system.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/img/system.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/img/system.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/img/system.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/validation.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/validation.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/validation.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/good_content/0.1.0/validation.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/agent/input/input.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/agent/input/input.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/agent/input/input.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/agent/input/input.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/changelog.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/changelog.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/changelog.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/changelog.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/fields/input.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/fields/input.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/fields/input.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/fields/input.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package/1.0.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/agent/input/input.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/agent/input/input.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/agent/input/input.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/agent/input/input.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/changelog.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/changelog.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/changelog.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/changelog.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/fields/input.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/fields/input.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/fields/input.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/fields/input.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/img/sample-logo.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/img/sample-logo.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/img/sample-logo.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/img/sample-logo.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/img/sample-screenshot.png b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/img/sample-screenshot.png similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/img/sample-screenshot.png rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/img/sample-screenshot.png diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.0.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/agent/input/input.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/agent/input/input.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/agent/input/input.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/agent/input/input.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/changelog.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/changelog.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/changelog.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/changelog.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/fields/input.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/fields/input.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/fields/input.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/fields/input.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/img/sample-logo.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/img/sample-logo.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/img/sample-logo.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/img/sample-logo.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/img/sample-screenshot.png b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/img/sample-screenshot.png similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/img/sample-screenshot.png rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/img/sample-screenshot.png diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/input_package_upgrade/1.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/changelog.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/changelog.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/changelog.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/changelog.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/fields/agent.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/fields/agent.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/fields/agent.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/fields/agent.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/fields/base-fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/fields/base-fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/fields/base-fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/fields/base-fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/data_stream/log/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/img/icon.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/img/icon.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/img/icon.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/img/icon.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/1.0.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/agent/input/input.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/agent/input/input.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/agent/input/input.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/agent/input/input.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/changelog.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/changelog.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/changelog.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/changelog.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/fields/input.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/fields/input.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/fields/input.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/fields/input.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/img/sample-logo.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/img/sample-logo.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/img/sample-logo.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/img/sample-logo.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/img/sample-screenshot.png b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/img/sample-screenshot.png similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/img/sample-screenshot.png rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/img/sample-screenshot.png diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/2.0.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/agent/input/input.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/agent/input/input.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/agent/input/input.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/agent/input/input.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/changelog.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/changelog.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/changelog.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/changelog.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/fields/input.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/fields/input.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/fields/input.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/fields/input.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/img/sample-logo.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/img/sample-logo.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/img/sample-logo.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/img/sample-logo.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/img/sample-screenshot.png b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/img/sample-screenshot.png similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/img/sample-screenshot.png rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/img/sample-screenshot.png diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/integration_to_input/3.0.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/istio/istio-0.3.3.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/istio/istio-0.3.3.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/istio/istio-0.3.3.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/istio/istio-0.3.3.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/data_stream/test/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/data_stream/test/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/data_stream/test/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/data_stream/test/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/data_stream/test/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/data_stream/test/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/data_stream/test/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/data_stream/test/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/data_stream/test/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/data_stream/test/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/data_stream/test/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/data_stream/test/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/data_stream/test/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/data_stream/test/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/data_stream/test/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/data_stream/test/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/data_stream/test/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/data_stream/test/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/data_stream/test/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/data_stream/test/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/data_stream/test/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/data_stream/test/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/data_stream/test/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/data_stream/test/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/nginx/nginx-1.12.0-beta.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/nginx/nginx-1.12.0-beta.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/nginx/nginx-1.12.0-beta.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/nginx/nginx-1.12.0-beta.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/nginx/nginx-1.12.1-beta.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/nginx/nginx-1.12.1-beta.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/nginx/nginx-1.12.1-beta.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/nginx/nginx-1.12.1-beta.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/data_stream/test/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/data_stream/test/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/data_stream/test/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/data_stream/test/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/data_stream/test/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/data_stream/test/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/data_stream/test/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/data_stream/test/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/data_stream/test/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/data_stream/test/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/data_stream/test/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/data_stream/test/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/data_stream/test/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/data_stream/test/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/data_stream/test/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/data_stream/test/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/no_tsdb_to_tsdb/0.2.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_logs/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_logs/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_logs/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_logs/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_logs/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_logs/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_logs/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_logs/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_logs/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_logs/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_logs/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_logs/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics_2/fields/ecs.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics_2/fields/ecs.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics_2/fields/ecs.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics_2/fields/ecs.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics_2/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics_2/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics_2/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics_2/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics_2/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics_2/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics_2/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/data_stream/test_metrics_2/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/non_epr_fields/1.0.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/img/logo_overrides_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/img/logo_overrides_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/img/logo_overrides_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/img/logo_overrides_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/kibana/dashboard/test_dashboard.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/kibana/dashboard/test_dashboard.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/kibana/dashboard/test_dashboard.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/kibana/dashboard/test_dashboard.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/kibana/search/test_search.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/kibana/search/test_search.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/kibana/search/test_search.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/kibana/search/test_search.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/kibana/visualization/test_visualization.json b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/kibana/visualization/test_visualization.json similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/kibana/visualization/test_visualization.json rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/kibana/visualization/test_visualization.json diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/only_dashboard/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/data_stream/test/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/data_stream/test/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/data_stream/test/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/data_stream/test/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/data_stream/test/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/data_stream/test/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/data_stream/test/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/data_stream/test/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/img/logo_overrides_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/img/logo_overrides_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/img/logo_overrides_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/img/logo_overrides_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/overrides/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/data_stream/test_stream/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/data_stream/test_stream/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/data_stream/test_stream/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/data_stream/test_stream/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/data_stream/test_stream/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/data_stream/test_stream/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/data_stream/test_stream/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/data_stream/test_stream/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/data_stream/test_stream/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/data_stream/test_stream/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/data_stream/test_stream/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/data_stream/test_stream/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/data_stream/test_stream/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/data_stream/test_stream/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/data_stream/test_stream/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/data_stream/test_stream/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/data_stream/test_stream/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/data_stream/test_stream/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/data_stream/test_stream/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/data_stream/test_stream/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/data_stream/test_stream/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/data_stream/test_stream/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/data_stream/test_stream/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/data_stream/test_stream/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/data_stream/test_stream/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/data_stream/test_stream/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/data_stream/test_stream/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/data_stream/test_stream/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/data_stream/test_stream/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/data_stream/test_stream/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/data_stream/test_stream/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/data_stream/test_stream/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/data_stream/test_stream/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/data_stream/test_stream/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/data_stream/test_stream/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/data_stream/test_stream/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.2.5-non-breaking-change/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/data_stream/test_stream/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/data_stream/test_stream/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/data_stream/test_stream/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/data_stream/test_stream/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/data_stream/test_stream/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/data_stream/test_stream/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/data_stream/test_stream/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/data_stream/test_stream/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/data_stream/test_stream/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/data_stream/test_stream/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/data_stream/test_stream/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/data_stream/test_stream/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.3.0-remove-test-var/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/data_stream/test_stream_new_2/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.5.0-restructure-inputs/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/data_stream/test_stream_new_2/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.6.0-restructure-policy-templates/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/data_stream/test_stream/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.7.0-add-stream-with-no-vars/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/data_stream/test_stream/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/package_policy_upgrade/0.8.0-add-vars-to-stream-with-no-vars/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/data_stream/test/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/data_stream/test/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/data_stream/test/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/data_stream/test/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/data_stream/test/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/data_stream/test/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/data_stream/test/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/data_stream/test/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/img/logo_prerelease_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/img/logo_prerelease_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/img/logo_prerelease_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/img/logo_prerelease_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/0.1.0-dev.0+abc/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/data_stream/test/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/data_stream/test/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/data_stream/test/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/data_stream/test/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/data_stream/test/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/data_stream/test/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/data_stream/test/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/data_stream/test/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/img/logo_prerelease_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/img/logo_prerelease_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/img/logo_prerelease_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/img/logo_prerelease_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/data_stream/test/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/data_stream/test/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/data_stream/test/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/data_stream/test/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/data_stream/test/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/data_stream/test/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/data_stream/test/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/data_stream/test/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/img/logo_prerelease_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/img/logo_prerelease_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/img/logo_prerelease_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/img/logo_prerelease_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prerelease/1.0.1-next/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prometheus/prometheus-1.16.0.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prometheus/prometheus-1.16.0.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prometheus/prometheus-1.16.0.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prometheus/prometheus-1.16.0.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prometheus/prometheus-1.17.0.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prometheus/prometheus-1.17.0.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/prometheus/prometheus-1.17.0.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/prometheus/prometheus-1.17.0.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/data_stream/test/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/data_stream/test/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/data_stream/test/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/data_stream/test/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/data_stream/test/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/data_stream/test/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/data_stream/test/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/data_stream/test/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/data_stream/test/routing_rules.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/data_stream/test/routing_rules.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/data_stream/test/routing_rules.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/data_stream/test/routing_rules.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/img/logo.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/img/logo.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/img/logo.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/img/logo.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/routing_rules/1.0.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/LICENSE.txt b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/LICENSE.txt similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/LICENSE.txt rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/LICENSE.txt diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/changelog.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/changelog.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/changelog.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/changelog.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/elasticsearch/ingest_pipeline/default.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/elasticsearch/ingest_pipeline/default.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/elasticsearch/ingest_pipeline/default.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/elasticsearch/ingest_pipeline/default.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/fields/base-fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/fields/base-fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/fields/base-fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/fields/base-fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/data_stream/foo/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/img/sample-logo.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/img/sample-logo.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/img/sample-logo.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/img/sample-logo.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/img/sample-screenshot.png b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/img/sample-screenshot.png similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/img/sample-screenshot.png rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/img/sample-screenshot.png diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/runtime_fields/0.0.1/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/agent/input/input.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/agent/input/input.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/agent/input/input.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/agent/input/input.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/data_stream/log/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/img/logo.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/img/logo.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/img/logo.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/img/logo.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.0.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/agent/input/input.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/agent/input/input.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/agent/input/input.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/agent/input/input.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/data_stream/log/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/img/logo.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/img/logo.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/img/logo.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/img/logo.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/secrets/1.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/security_detection_engine/security_detection_engine-8.16.0.zip b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/security_detection_engine/security_detection_engine-8.16.0.zip similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/security_detection_engine/security_detection_engine-8.16.0.zip rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/security_detection_engine/security_detection_engine-8.16.0.zip diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/single_input_no_streams/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/single_input_no_streams/0.1.0/docs/README.md similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/single_input_no_streams/0.1.0/docs/README.md rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/single_input_no_streams/0.1.0/docs/README.md diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/single_input_no_streams/0.1.0/img/logo_overrides_64_color.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/single_input_no_streams/0.1.0/img/logo_overrides_64_color.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/single_input_no_streams/0.1.0/img/logo_overrides_64_color.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/single_input_no_streams/0.1.0/img/logo_overrides_64_color.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/single_input_no_streams/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/single_input_no_streams/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/single_input_no_streams/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/single_input_no_streams/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/data_stream/log/agent/stream/stream.yml.hbs b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/data_stream/log/agent/stream/stream.yml.hbs similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/data_stream/log/agent/stream/stream.yml.hbs rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/data_stream/log/agent/stream/stream.yml.hbs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/data_stream/log/fields/fields.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/data_stream/log/fields/fields.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/data_stream/log/fields/fields.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/data_stream/log/fields/fields.yml diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/data_stream/log/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/data_stream/log/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/data_stream/log/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/data_stream/log/manifest.yml diff --git a/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/docs/README.md b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/docs/README.md new file mode 100644 index 0000000000000..e0c6f30fefce9 --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/docs/README.md @@ -0,0 +1,5 @@ +# filetest + +This package contains randomly collected files from other packages to be used in API integration tests. + +It also serves as an example how to serve a package from the fixtures directory with the package registry docker container. For this, also see the `x-pack/platform/test/fleet_api_integration/config.ts` how the `test_packages` directory is mounted into the docker container, and `x-pack/platform/test/fleet_api_integration/apis/fixtures/package_registry_config.yml` how to pass the directory to the registry. diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/img/logo.svg b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/img/logo.svg similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/img/logo.svg rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/img/logo.svg diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/img/screenshots/metricbeat_dashboard.png b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/img/screenshots/metricbeat_dashboard.png similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/img/screenshots/metricbeat_dashboard.png rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/img/screenshots/metricbeat_dashboard.png diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/manifest.yml b/x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/manifest.yml similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/manifest.yml rename to x-pack/platform/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/manifest.yml diff --git a/x-pack/test/fleet_api_integration/apis/fleet_proxies/crud.ts b/x-pack/platform/test/fleet_api_integration/apis/fleet_proxies/crud.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fleet_proxies/crud.ts rename to x-pack/platform/test/fleet_api_integration/apis/fleet_proxies/crud.ts diff --git a/x-pack/test/fleet_api_integration/apis/fleet_server_hosts/crud.ts b/x-pack/platform/test/fleet_api_integration/apis/fleet_server_hosts/crud.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fleet_server_hosts/crud.ts rename to x-pack/platform/test/fleet_api_integration/apis/fleet_server_hosts/crud.ts diff --git a/x-pack/test/fleet_api_integration/apis/fleet_settings_privileges.ts b/x-pack/platform/test/fleet_api_integration/apis/fleet_settings_privileges.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fleet_settings_privileges.ts rename to x-pack/platform/test/fleet_api_integration/apis/fleet_settings_privileges.ts diff --git a/x-pack/test/fleet_api_integration/apis/fleet_setup.ts b/x-pack/platform/test/fleet_api_integration/apis/fleet_setup.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/fleet_setup.ts rename to x-pack/platform/test/fleet_api_integration/apis/fleet_setup.ts diff --git a/x-pack/test/fleet_api_integration/apis/fleet_telemetry.ts b/x-pack/platform/test/fleet_api_integration/apis/fleet_telemetry.ts similarity index 99% rename from x-pack/test/fleet_api_integration/apis/fleet_telemetry.ts rename to x-pack/platform/test/fleet_api_integration/apis/fleet_telemetry.ts index 5afd57dbe1531..5a610ce087815 100644 --- a/x-pack/test/fleet_api_integration/apis/fleet_telemetry.ts +++ b/x-pack/platform/test/fleet_api_integration/apis/fleet_telemetry.ts @@ -41,7 +41,6 @@ export default function (providerContext: FtrProviderContext) { } }); - // eslint-disable-next-line mocha/no-sibling-hooks before(async () => { // we must first force install the fleet_server package to override package verification error on policy create // https://github.com/elastic/kibana/issues/137450 diff --git a/x-pack/test/fleet_api_integration/apis/index.js b/x-pack/platform/test/fleet_api_integration/apis/index.ts similarity index 91% rename from x-pack/test/fleet_api_integration/apis/index.js rename to x-pack/platform/test/fleet_api_integration/apis/index.ts index 90930b343fb9b..78f502223e749 100644 --- a/x-pack/test/fleet_api_integration/apis/index.js +++ b/x-pack/platform/test/fleet_api_integration/apis/index.ts @@ -6,8 +6,9 @@ */ import { setupTestUsers } from './test_users'; +import { FtrProviderContext } from '../../api_integration/ftr_provider_context'; -export default function ({ loadTestFile, getService }) { +export default function ({ loadTestFile, getService }: FtrProviderContext) { // total runtime ~ 4m describe('Fleet Endpoints', function () { before(async () => { diff --git a/x-pack/test/fleet_api_integration/apis/integrations/elastic_agent.ts b/x-pack/platform/test/fleet_api_integration/apis/integrations/elastic_agent.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/integrations/elastic_agent.ts rename to x-pack/platform/test/fleet_api_integration/apis/integrations/elastic_agent.ts diff --git a/x-pack/test/fleet_api_integration/apis/integrations/index.js b/x-pack/platform/test/fleet_api_integration/apis/integrations/index.js similarity index 100% rename from x-pack/test/fleet_api_integration/apis/integrations/index.js rename to x-pack/platform/test/fleet_api_integration/apis/integrations/index.js diff --git a/x-pack/test/fleet_api_integration/apis/integrations/inputs_with_standalone_docker_agent.ts b/x-pack/platform/test/fleet_api_integration/apis/integrations/inputs_with_standalone_docker_agent.ts similarity index 85% rename from x-pack/test/fleet_api_integration/apis/integrations/inputs_with_standalone_docker_agent.ts rename to x-pack/platform/test/fleet_api_integration/apis/integrations/inputs_with_standalone_docker_agent.ts index 12d5c0fbeba4f..4c6f3ccfed7d3 100644 --- a/x-pack/test/fleet_api_integration/apis/integrations/inputs_with_standalone_docker_agent.ts +++ b/x-pack/platform/test/fleet_api_integration/apis/integrations/inputs_with_standalone_docker_agent.ts @@ -5,6 +5,8 @@ * 2.0. */ +import axios from 'axios'; +import { last } from 'lodash'; import { ToolingLog } from '@kbn/tooling-log'; import { tmpdir } from 'os'; import { writeFile } from 'fs/promises'; @@ -12,11 +14,31 @@ import { v4 as uuid } from 'uuid'; import execa from 'execa'; import path from 'path'; import expect from '@kbn/expect'; - +import { retryForSuccess } from '@kbn/ftr-common-functional-services'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; -import { getLatestVersion } from '../../../fleet_cypress/artifact_manager'; import { skipIfNoDockerRegistry } from '../../helpers'; +const DEFAULT_VERSION = '8.15.0-SNAPSHOT'; +const name = 'Artifact Manager - getLatestVersion'; + +export async function getLatestVersion(): Promise { + return retryForSuccess( + new ToolingLog({ level: 'debug', writeTo: process.stdout }, { context: name }), + { + timeout: 60_000, + methodName: name, + retryCount: 20, + block: () => axios('https://artifacts-api.elastic.co/v1/versions'), + } + ) + .then( + (response) => + last((response.data.versions as string[]).filter((v) => v.includes('-SNAPSHOT'))) || + DEFAULT_VERSION + ) + .catch(() => DEFAULT_VERSION); +} + export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; diff --git a/x-pack/test/fleet_api_integration/apis/outputs/crud.ts b/x-pack/platform/test/fleet_api_integration/apis/outputs/crud.ts similarity index 99% rename from x-pack/test/fleet_api_integration/apis/outputs/crud.ts rename to x-pack/platform/test/fleet_api_integration/apis/outputs/crud.ts index 0b6c6bb9adf63..3d79e6d20d445 100644 --- a/x-pack/test/fleet_api_integration/apis/outputs/crud.ts +++ b/x-pack/platform/test/fleet_api_integration/apis/outputs/crud.ts @@ -207,7 +207,6 @@ export default function (providerContext: FtrProviderContext) { let fleetServerPolicyId: string; let fleetServerPolicyWithCustomOutputId: string; - // eslint-disable-next-line mocha/no-sibling-hooks before(async function () { await enableSecrets(providerContext); await enableOutputSecrets(); @@ -1378,7 +1377,6 @@ export default function (providerContext: FtrProviderContext) { }); }); - // eslint-disable-next-line mocha/no-identical-title it('should discard the shipper values when shipper is disabled', async function () { await supertest .post(`/api/fleet/outputs`) @@ -1889,7 +1887,6 @@ export default function (providerContext: FtrProviderContext) { .expect(400); }); - // eslint-disable-next-line mocha/no-identical-title it('should return a 400 when deleting a default output ', async function () { await supertest .delete(`/api/fleet/outputs/${defaultMonitoringOutputId}`) diff --git a/x-pack/test/fleet_api_integration/apis/outputs/index.js b/x-pack/platform/test/fleet_api_integration/apis/outputs/index.js similarity index 100% rename from x-pack/test/fleet_api_integration/apis/outputs/index.js rename to x-pack/platform/test/fleet_api_integration/apis/outputs/index.js diff --git a/x-pack/test/fleet_api_integration/apis/outputs/logstash_api_keys.ts b/x-pack/platform/test/fleet_api_integration/apis/outputs/logstash_api_keys.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/outputs/logstash_api_keys.ts rename to x-pack/platform/test/fleet_api_integration/apis/outputs/logstash_api_keys.ts diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/create.ts b/x-pack/platform/test/fleet_api_integration/apis/package_policy/create.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/package_policy/create.ts rename to x-pack/platform/test/fleet_api_integration/apis/package_policy/create.ts diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/delete.ts b/x-pack/platform/test/fleet_api_integration/apis/package_policy/delete.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/package_policy/delete.ts rename to x-pack/platform/test/fleet_api_integration/apis/package_policy/delete.ts diff --git a/x-pack/platform/test/fleet_api_integration/apis/package_policy/get.ts b/x-pack/platform/test/fleet_api_integration/apis/package_policy/get.ts new file mode 100644 index 0000000000000..4d5e1756b4176 --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/apis/package_policy/get.ts @@ -0,0 +1,454 @@ +/* + * 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 expect from '@kbn/expect'; +import { INGEST_SAVED_OBJECT_INDEX } from '@kbn/core-saved-objects-server'; +import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; +import { skipIfNoDockerRegistry, isDockerRegistryEnabledOrSkipped } from '../../helpers'; + +export default function (providerContext: FtrProviderContext) { + const { getService } = providerContext; + const supertest = getService('supertest'); + const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); + + // use function () {} and not () => {} here + // because `this` has to point to the Mocha context + // see https://mochajs.org/#arrow-functions + + const deleteEndpointPackage = async () => { + await supertest + .delete(`/api/fleet/epm/packages/endpoint/8.6.1`) + .set('kbn-xsrf', 'xxxx') + .send({ force: true }) + .expect(200); + }; + + describe('Package Policy APIs', () => { + skipIfNoDockerRegistry(providerContext); + + before(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + await esArchiver.load('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); + }); + + after(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); + await kibanaServer.savedObjects.cleanStandardList(); + }); + + describe('get by id', function () { + let agentPolicyId: string; + let packagePolicyId: string; + let endpointPackagePolicyId: string; + + before(async function () { + if (!isDockerRegistryEnabledOrSkipped(providerContext)) { + return; + } + + const { body: agentPolicyResponse } = await supertest + .post(`/api/fleet/agent_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'Test policy', + namespace: 'default', + }); + agentPolicyId = agentPolicyResponse.item.id; + + const { body: packagePolicyResponse } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }); + packagePolicyId = packagePolicyResponse.item.id; + + const { body: endpointPackagePolicyResponse } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'endpoint-1', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + force: true, + package: { + name: 'endpoint', + title: 'Elastic Defend', + version: '8.6.1', + }, + }); + endpointPackagePolicyId = endpointPackagePolicyResponse.item.id; + }); + + after(async function () { + if (!isDockerRegistryEnabledOrSkipped(providerContext)) { + return; + } + + await supertest + .post(`/api/fleet/agent_policies/delete`) + .set('kbn-xsrf', 'xxxx') + .send({ agentPolicyId }) + .expect(200); + + await supertest + .post(`/api/fleet/package_policies/delete`) + .set('kbn-xsrf', 'xxxx') + .send({ packagePolicyIds: [packagePolicyId, endpointPackagePolicyId] }) + .expect(200); + + await deleteEndpointPackage(); + }); + + it('should succeed with a valid id', async function () { + await supertest.get(`/api/fleet/package_policies/${packagePolicyId}`).expect(200); + }); + + it('should return a 404 with an invalid id', async function () { + await supertest.get(`/api/fleet/package_policies/IS_NOT_PRESENT`).expect(404); + }); + + it('should succeed and return formatted inputs when the format=simplified query param is passed', async function () { + const { + body: { item }, + } = await supertest + .get(`/api/fleet/package_policies/${packagePolicyId}?format=simplified`) + .expect(200); + + expect(Array.isArray(item.inputs)).to.be(false); + }); + + it('should succeed and return arrayed inputs when the format=legacy query param is passed', async function () { + const { + body: { item }, + } = await supertest + .get(`/api/fleet/package_policies/${packagePolicyId}?format=legacy`) + .expect(200); + + expect(Array.isArray(item.inputs)); + }); + + it('should return 400 if an invalid format query param is passed', async function () { + await supertest + .get(`/api/fleet/package_policies/${packagePolicyId}?format=foo`) + .expect(400); + }); + }); + + describe('POST /api/fleet/package_policies/_bulk_get', function () { + let agentPolicyId: string; + let packagePolicyId: string; + let endpointPackagePolicyId: string; + + before(async function () { + if (!isDockerRegistryEnabledOrSkipped(providerContext)) { + return; + } + + const { body: agentPolicyResponse } = await supertest + .post(`/api/fleet/agent_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'Test policy', + namespace: 'default', + }); + agentPolicyId = agentPolicyResponse.item.id; + + const { body: packagePolicyResponse } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }); + packagePolicyId = packagePolicyResponse.item.id; + + const { body: endpointPackagePolicyResponse } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'endpoint-1', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + force: true, + package: { + name: 'endpoint', + title: 'Elastic Defend', + version: '8.6.1', + }, + }); + endpointPackagePolicyId = endpointPackagePolicyResponse.item.id; + }); + + after(async function () { + if (!isDockerRegistryEnabledOrSkipped(providerContext)) { + return; + } + + await supertest + .post(`/api/fleet/agent_policies/delete`) + .set('kbn-xsrf', 'xxxx') + .send({ agentPolicyId }) + .expect(200); + + await supertest + .post(`/api/fleet/package_policies/delete`) + .set('kbn-xsrf', 'xxxx') + .send({ packagePolicyIds: [packagePolicyId, endpointPackagePolicyId] }) + .expect(200); + + await deleteEndpointPackage(); + }); + + it('should succeed with valid ids', async function () { + const { + body: { items }, + } = await supertest + .post(`/api/fleet/package_policies/_bulk_get`) + .set('kbn-xsrf', 'xxxx') + .send({ ids: [packagePolicyId] }) + .expect(200); + + expect(items.length).eql(1); + expect(Array.isArray(items[0])); + }); + + it('should return 404 with invalid ids', async function () { + await supertest + .post(`/api/fleet/package_policies/_bulk_get`) + .set('kbn-xsrf', 'xxxx') + .send({ ids: ['invalid-id-i-do-not-exists'] }) + .expect(404); + }); + + it('should succeed with mixed valid ids and invalid ids and ignoreMissing flag ', async function () { + const { + body: { items }, + } = await supertest + .post(`/api/fleet/package_policies/_bulk_get`) + .set('kbn-xsrf', 'xxxx') + .send({ ids: [packagePolicyId, 'invalid-id-i-do-not-exists'], ignoreMissing: true }) + .expect(200); + + expect(items.length).eql(1); + }); + + it('should succeed and return formatted inputs when the format=simplified query param is passed', async function () { + const { + body: { items }, + } = await supertest + .post(`/api/fleet/package_policies/_bulk_get?format=simplified`) + .set('kbn-xsrf', 'xxxx') + .send({ ids: [packagePolicyId] }) + .expect(200); + + expect(items.length).eql(1); + expect(Array.isArray(items[0])).to.be(false); + }); + + it('should succeed and return arrayed inputs when the format=legacy query param is passed', async function () { + const { + body: { items }, + } = await supertest + .post(`/api/fleet/package_policies/_bulk_get?format=legacy`) + .set('kbn-xsrf', 'xxxx') + .send({ ids: [packagePolicyId] }) + .expect(200); + + expect(items.length).eql(1); + expect(Array.isArray(items[0])); + }); + + it('should return 400 if an invalid format query param is passed', async function () { + await supertest + .post(`/api/fleet/package_policies/_bulk_get?format=foo`) + .set('kbn-xsrf', 'xxxx') + .send({ ids: [packagePolicyId] }) + .expect(400); + }); + }); + + describe('get orphaned policies', () => { + let agentPolicyId: string; + let packagePolicyId: string; + + before(async function () { + if (!isDockerRegistryEnabledOrSkipped(providerContext)) { + return; + } + + const { body: agentPolicyResponse } = await supertest + .post(`/api/fleet/agent_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'Test policy', + namespace: 'default', + }); + + agentPolicyId = agentPolicyResponse.item.id; + + const { body: packagePolicyResponse } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }); + + packagePolicyId = packagePolicyResponse.item.id; + + // Delete the agent policy directly from ES to orphan the package policy + const esClient = getService('es'); + await esClient.delete({ + index: INGEST_SAVED_OBJECT_INDEX, + id: `ingest-agent-policies:${agentPolicyId}`, + refresh: 'wait_for', + }); + }); + + after(async function () { + if (!isDockerRegistryEnabledOrSkipped(providerContext)) { + return; + } + + await supertest + .post(`/api/fleet/package_policies/delete`) + .set('kbn-xsrf', 'xxxx') + .send({ packagePolicyIds: [packagePolicyId], force: true }) + .expect(200); + }); + + it('should return orphaned policy', async () => { + const response = await supertest + .get('/internal/fleet/orphaned_integration_policies') + .expect(200); + + expect(response.body.items).to.have.length(1); + expect(response.body.items[0].id).to.eql(packagePolicyId); + }); + }); + + describe('get by kuery', function () { + let agentPolicyId: string; + let endpointPackagePolicyId: string; + + before(async function () { + if (!isDockerRegistryEnabledOrSkipped(providerContext)) { + return; + } + + const { body: agentPolicyResponse } = await supertest + .post(`/api/fleet/agent_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'Test policy', + namespace: 'default', + }); + agentPolicyId = agentPolicyResponse.item.id; + + const { body: endpointPackagePolicyResponse } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'endpoint-1', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + force: true, + package: { + name: 'endpoint', + title: 'Elastic Defend', + version: '8.6.1', + }, + }); + endpointPackagePolicyId = endpointPackagePolicyResponse.item.id; + }); + + after(async function () { + if (!isDockerRegistryEnabledOrSkipped(providerContext)) { + return; + } + + await supertest + .post(`/api/fleet/package_policies/delete`) + .set('kbn-xsrf', 'xxxx') + .send({ packagePolicyIds: [endpointPackagePolicyId] }) + .expect(200); + + await deleteEndpointPackage(); + }); + + it('should return 200 if the passed kuery is correct', async () => { + const { body: packagePolicyResponse } = await supertest + .get(`/api/fleet/package_policies?kuery=ingest-package-policies.package.name:endpoint`) + .set('kbn-xsrf', 'xxxx') + .expect(200); + + expect(packagePolicyResponse.items[0].id).to.eql(endpointPackagePolicyId); + }); + it('should return 400 if the passed kuery does not have prefix ingest-package-policies', async () => { + await supertest + .get(`/api/fleet/package_policies?kuery=package.name:endpoint`) + .set('kbn-xsrf', 'xxxx') + .expect(400); + }); + + it('with enableStrictKQLValidation should return 400 if the passed kuery is not correct', async () => { + await supertest + .get( + `/api/fleet/package_policies?kuery=ingest-package-policies.non_existent_parameter:test` + ) + .set('kbn-xsrf', 'xxxx') + .expect(400); + }); + + it('with enableStrictKQLValidation should return 400 if the passed kuery is invalid', async () => { + await supertest + .get(`/api/fleet/package_policies?kuery='test%3A'`) + .set('kbn-xsrf', 'xxxx') + .expect(400); + }); + }); + }); +} diff --git a/x-pack/platform/test/fleet_api_integration/apis/package_policy/helper.ts b/x-pack/platform/test/fleet_api_integration/apis/package_policy/helper.ts new file mode 100644 index 0000000000000..2c53248905521 --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/apis/package_policy/helper.ts @@ -0,0 +1,13 @@ +/* + * 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 { Agent } from 'supertest'; + +export async function getInstallationInfo(supertest: Agent, name: string, version: string) { + const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); + return res.body.item.installationInfo; +} diff --git a/x-pack/platform/test/fleet_api_integration/apis/package_policy/index.js b/x-pack/platform/test/fleet_api_integration/apis/package_policy/index.js new file mode 100644 index 0000000000000..8cb9cbd66a186 --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/apis/package_policy/index.js @@ -0,0 +1,24 @@ +/* + * 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')); + loadTestFile(require.resolve('./input_package_rollback')); + }); +} diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts b/x-pack/platform/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts rename to x-pack/platform/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts b/x-pack/platform/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts rename to x-pack/platform/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts diff --git a/x-pack/platform/test/fleet_api_integration/apis/package_policy/update.ts b/x-pack/platform/test/fleet_api_integration/apis/package_policy/update.ts new file mode 100644 index 0000000000000..d83e57330fe72 --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/apis/package_policy/update.ts @@ -0,0 +1,994 @@ +/* + * 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 expect from '@kbn/expect'; +import { NewPackagePolicy } from '@kbn/fleet-plugin/common'; +import { sortBy } from 'lodash'; +import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; +import { + skipIfNoDockerRegistry, + isDockerRegistryEnabledOrSkipped, + enableSecrets, +} from '../../helpers'; +import { getInstallationInfo } from './helper'; + +export default function (providerContext: FtrProviderContext) { + const { getService } = providerContext; + const supertest = getService('supertest'); + const kibanaServer = getService('kibanaServer'); + const esArchiver = getService('esArchiver'); + const es = getService('es'); + + const expectIdArraysEqual = (arr1: any[], arr2: any[]) => { + expect(sortBy(arr1, 'id')).to.eql(sortBy(arr2, 'id')); + }; + + const getPackagePolicyById = async (id: string) => { + const { body } = await supertest.get(`/api/fleet/package_policies/${id}`); + return body; + }; + + const getComponentTemplate = async (name: string) => { + try { + const { component_templates: templates } = await es.cluster.getComponentTemplate({ name }); + + return templates?.[0] || null; + } catch (e) { + if (e.statusCode === 404) { + return null; + } + + throw e; + } + }; + + // use function () {} and not () => {} here + // because `this` has to point to the Mocha context + // see https://mochajs.org/#arrow-functions + + describe('Package Policy - update', function () { + skipIfNoDockerRegistry(providerContext); + let agentPolicyId: string; + let packagePolicyId: string; + let packagePolicyId2: string; + let packagePolicyId3: string; + let managedAgentPolicyId: string; + let packagePolicySecrets: any; + let packagePolicySecretsId: string; + let endpointPackagePolicyId: string; + let inputOnlyPackagePolicyId: string; + let inputOnlyBasePackagePolicy: NewPackagePolicy; + + before(async function () { + await esArchiver.load('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); + await kibanaServer.savedObjects.cleanStandardList(); + if (!isDockerRegistryEnabledOrSkipped(providerContext)) { + return; + } + + await enableSecrets(providerContext); + + await supertest.delete(`/api/fleet/epm/packages/endpoint/8.6.1`).set('kbn-xsrf', 'xxxx'); + const [{ body: agentPolicyResponse }, { body: managedAgentPolicyResponse }] = + await Promise.all([ + supertest.post(`/api/fleet/agent_policies`).set('kbn-xsrf', 'xxxx').send({ + name: 'Test policy', + namespace: 'default', + }), + supertest.post(`/api/fleet/agent_policies`).set('kbn-xsrf', 'xxxx').send({ + name: 'Test hosted agent policy', + namespace: 'default', + is_managed: true, + }), + ]); + + agentPolicyId = agentPolicyResponse.item.id; + + // if one already exists, re-use that + const managedExists = managedAgentPolicyResponse.statusCode === 409; + if (managedExists) { + const errorRegex = /^agent policy \'(?[\w,\-]+)\' already exists/i; + const result = errorRegex.exec(managedAgentPolicyResponse.message); + if (result?.groups?.id) { + managedAgentPolicyId = result.groups.id; + } + } else { + managedAgentPolicyId = managedAgentPolicyResponse.item.id; + } + + inputOnlyBasePackagePolicy = { + name: 'input-only-test-1', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + policy_ids: [agentPolicyId], + enabled: true, + inputs: [ + { + type: 'logfile', + policy_template: 'logs', + enabled: true, + streams: [ + { + enabled: true, + data_stream: { type: 'logs', dataset: 'input_package.logs' }, + vars: { + paths: { type: 'text', value: ['/tmp/test.log'] }, + tags: { type: 'text', value: ['tag1'] }, + ignore_older: { value: '72h', type: 'text' }, + 'data_stream.dataset': { type: 'text', value: 'input_package_test' }, + }, + }, + ], + }, + ], + package: { name: 'input_package', title: 'Input only package', version: '1.0.0' }, + }; + + const { body: packagePolicyResponse } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }); + packagePolicyId = packagePolicyResponse.item.id; + + const { body: packagePolicyResponse2 } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-2', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }); + packagePolicyId2 = packagePolicyResponse2.item.id; + + const { body: packagePolicyResponse3 } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'update-package-policy-with_required_variables-1', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + inputs: { + 'with_required_variables-test_input': { + streams: { + 'with_required_variables.log': { + vars: { test_var_required: 'I am required' }, + }, + }, + }, + }, + package: { + name: 'with_required_variables', + version: '0.1.0', + }, + }); + packagePolicyId3 = packagePolicyResponse3.item.id; + + const { body: endpointPackagePolicyResponse } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'endpoint-1', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + enabled: true, + inputs: [ + { + enabled: true, + streams: [], + type: 'endpoint', + }, + ], + force: true, + package: { + name: 'endpoint', + title: 'Elastic Defend', + version: '8.6.1', + }, + }); + endpointPackagePolicyId = endpointPackagePolicyResponse.item.id; + + const { body: secretsPackagePolicyResponse } = await supertest + .post(`/api/fleet/package_policies?format=simplified`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'secrets-1', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + inputs: { + 'secrets-test_input': { + vars: { + input_var_secret: 'input_var_secret_value', + }, + }, + }, + vars: { + package_var_non_secret: 'package_var_non_secret_value', + package_var_secret: 'package_var_secret_value', + }, + force: true, + package: { + name: 'secrets', + version: '1.1.0', + }, + }); + packagePolicySecrets = secretsPackagePolicyResponse.item; + packagePolicySecretsId = secretsPackagePolicyResponse.item.id; + + const { body: inputOnlyPolicyResponse } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send(inputOnlyBasePackagePolicy); + + inputOnlyPackagePolicyId = inputOnlyPolicyResponse.item.id; + }); + + after(async function () { + await supertest + .post(`/api/fleet/agent_policies/delete`) + .set('kbn-xsrf', 'xxxx') + .send({ agentPolicyId }); + // uninstall endpoint package + await supertest + .delete(`/api/fleet/epm/packages/endpoint/8.6.1`) + .set('kbn-xsrf', 'xxxx') + .expect(200); + await supertest + .delete(`/api/fleet/epm/packages/input_package/1.0.0`) + .set('kbn-xsrf', 'xxxx') + .expect(200); + + await esArchiver.unload('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); + await kibanaServer.savedObjects.cleanStandardList(); + }); + + it('should work with valid values on "regular" policies', async function () { + await supertest + .put(`/api/fleet/package_policies/${packagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'updated_namespace', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }); + }); + + it('should work with multiple policy ids', async function () { + const response = await supertest + .put(`/api/fleet/package_policies/${packagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'updated_namespace', + policy_ids: [agentPolicyId, managedAgentPolicyId], + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }); + expect(response.body.item.policy_ids).to.eql([agentPolicyId, managedAgentPolicyId]); + }); + + it('should work with no policy ids', async function () { + const { body: packagePolicyResponse } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-to-clear-policy', + description: '', + namespace: 'default', + policy_id: agentPolicyId, + policy_ids: [agentPolicyId], + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }); + const response = await supertest + .put(`/api/fleet/package_policies/${packagePolicyResponse.item.id}`) + .set('kbn-xsrf', 'xxxx') + .send({ + policy_ids: [], + }) + .expect(200); + expect(response.body.item.policy_id).to.eql(null); + expect(response.body.item.policy_ids).to.eql([]); + }); + + it('should trim whitespace from name on update', async function () { + await supertest + .put(`/api/fleet/package_policies/${packagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: ' filetest-1 ', + description: '', + namespace: 'updated_namespace', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }); + + const { item: policy } = await getPackagePolicyById(packagePolicyId); + + expect(policy.name).to.equal('filetest-1'); + }); + + it('should work with valid values on hosted policies', async function () { + await supertest + .put(`/api/fleet/package_policies/${packagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'updated_namespace', + policy_id: managedAgentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }); + }); + + it('should return a 409 if there is another package policy with the same name', async function () { + await supertest + .put(`/api/fleet/package_policies/${packagePolicyId2}`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'updated_namespace', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }) + .expect(409); + }); + + it('should return a 409 if there is another package policy with the same name on a different policy', async function () { + const { body: agentPolicyResponse } = await supertest + .post(`/api/fleet/agent_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'Test policy 2', + namespace: 'default', + }); + const otherAgentPolicyId = agentPolicyResponse.item.id; + + await supertest + .put(`/api/fleet/package_policies/${packagePolicyId2}`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'updated_namespace', + policy_id: otherAgentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }) + .expect(409); + }); + + it('should work with frozen input vars', async function () { + await supertest + .put(`/api/fleet/package_policies/${packagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'updated_namespace', + policy_id: agentPolicyId, + enabled: true, + inputs: [ + { + enabled: true, + type: 'test-input', + streams: [], + vars: { + frozen_var: { + type: 'text', + value: 'abc', + frozen: true, + }, + unfrozen_var: { + type: 'text', + value: 'def', + }, + }, + }, + ], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }); + }); + + it('should succeed and return formatted inputs when the format=simplified query param is passed', async function () { + const { + body: { item }, + } = await supertest + .put(`/api/fleet/package_policies/${packagePolicyId}?format=simplified`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'updated_namespace', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }) + .expect(200); + + expect(Array.isArray(item.inputs)).to.be(false); + }); + + it('should succeed and return arrayed inputs when the format=legacy query param is passed', async function () { + const { + body: { item }, + } = await supertest + .put(`/api/fleet/package_policies/${packagePolicyId}?format=legacy`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'updated_namespace', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }) + .expect(200); + + expect(Array.isArray(item.inputs)); + }); + + it('should return 400 if an invalid format query param is passed', async function () { + await supertest + .put(`/api/fleet/package_policies/${packagePolicyId}?format=foo`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'filetest-1', + description: '', + namespace: 'updated_namespace', + policy_id: agentPolicyId, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + }) + .expect(400); + }); + + it('should return 200 and disable an input that has all disabled streams', async function () { + const { body } = await supertest + .put(`/api/fleet/package_policies/${packagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + enabled: true, + inputs: [ + { + enabled: true, + streams: [ + { + enabled: false, + data_stream: { + type: 'logs', + dataset: 'test.some_logs', + }, + }, + ], + type: 'single_input', + }, + ], + }) + .expect(200); + expect(body.item.inputs[0].enabled).to.eql(false); + }); + + it('should allow to override inputs', async function () { + await supertest + .put(`/api/fleet/package_policies/${endpointPackagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + overrides: { + inputs: { + 'policy-id': { + log_level: 'debug', + }, + }, + }, + }) + .expect(200); + }); + + it('should not allow to override compiled_streams', async function () { + await supertest + .put(`/api/fleet/package_policies/${endpointPackagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + overrides: { + inputs: { + compiled_streams: {}, + }, + }, + }) + .expect(400); + }); + + it('should not allow to override compiled_inputs', async function () { + await supertest + .put(`/api/fleet/package_policies/${endpointPackagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + overrides: { + inputs: { + compiled_inputs: {}, + }, + }, + }) + .expect(400); + }); + + it('should not allow to override properties other than inputs', async function () { + await supertest + .put(`/api/fleet/package_policies/${endpointPackagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + overrides: { + name: 'test', + }, + }) + .expect(400); + }); + + it('should return 400 if updating output to non-local ES for an agentless integration', async function () { + const { body: outputResponse } = await supertest + .post(`/api/fleet/outputs`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'logstash-output', + type: 'logstash', + hosts: ['test.fr:443'], + ssl: { + certificate: 'CERTIFICATE', + key: 'KEY', + certificate_authorities: ['CA1', 'CA2'], + }, + }) + .expect(200); + + const { body: packagePolicyResponse } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'agentless-integration-policy', + description: '', + namespace: 'default', + policy_ids: [], + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + supports_agentless: true, + }) + .expect(200); + + const response = await supertest + .put(`/api/fleet/package_policies/${packagePolicyResponse.item.id}`) + .set('kbn-xsrf', 'xxxx') + .send({ + output_id: outputResponse.item.id, + }) + .expect(400); + + expect(response.body.message).to.eql( + 'Output type "logstash" is not usable with package "filetest"' + ); + }); + + describe('Simplified package policy', () => { + it('should work with valid values', async function () { + await supertest + .put(`/api/fleet/package_policies/${packagePolicyId3}`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: `update-simplified-package-policy-with_required_variables-${Date.now()}`, + description: '', + namespace: 'default', + policy_id: agentPolicyId, + inputs: { + 'with_required_variables-test_input': { + streams: { + 'with_required_variables.log': { + vars: { test_var_required: 'I am required' }, + }, + }, + }, + }, + package: { + name: 'with_required_variables', + version: '0.1.0', + }, + }) + .expect(200); + }); + + it('should work with secret values', async function () { + await supertest + .put(`/api/fleet/package_policies/${packagePolicySecretsId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: `update-simplified-package-policy-with_required_variables-${Date.now()}`, + description: '', + namespace: 'default', + policy_id: agentPolicyId, + inputs: packagePolicySecrets.inputs, + vars: packagePolicySecrets.vars, + package: { + name: 'secrets', + version: '1.1.0', + }, + }) + .expect(200); + }); + + it('should return a 400 with invalid inputs', async function () { + const { body } = await supertest + .put(`/api/fleet/package_policies/${packagePolicyId3}`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: `update-simplified-package-policy-with_required_variables-${Date.now()}`, + description: '', + namespace: 'default', + policy_id: agentPolicyId, + inputs: { + 'with_required_variables-i-do-not-exists': {}, + }, + package: { + name: 'with_required_variables', + version: '0.1.0', + }, + }) + .expect(400); + expect(body.message).eql('Input not found: with_required_variables-i-do-not-exists'); + }); + + it('should return a 400 if namespace is edited on input only package policy', async function () { + const { body } = await supertest + .put(`/api/fleet/package_policies/${inputOnlyPackagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + ...inputOnlyBasePackagePolicy, + namespace: 'updated_namespace', + }) + .expect(400); + expect(body.message).eql( + 'Package policy namespace cannot be modified for input only packages, please create a new package policy.' + ); + }); + + it('should return a 400 if dataset is edited on input only package policy', async function () { + const updatedPolicy = JSON.parse(JSON.stringify(inputOnlyBasePackagePolicy)); + + updatedPolicy.inputs[0].streams[0].vars['data_stream.dataset'].value = 'updated_dataset'; + + const { body } = await supertest + .put(`/api/fleet/package_policies/${inputOnlyPackagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send(updatedPolicy) + .expect(400); + expect(body.message).eql( + 'Package policy dataset cannot be modified for input only packages, please create a new package policy.' + ); + }); + + it('should succeed and return formatted inputs when the format=simplified query param is passed', async function () { + const { + body: { item }, + } = await supertest + .put(`/api/fleet/package_policies/${packagePolicyId}?format=simplified`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: `update-simplified-package-policy-with_required_variables-${Date.now()}`, + description: '', + namespace: 'default', + policy_id: agentPolicyId, + inputs: { + 'with_required_variables-test_input': { + streams: { + 'with_required_variables.log': { + vars: { test_var_required: 'I am required' }, + }, + }, + }, + }, + package: { + name: 'with_required_variables', + version: '0.1.0', + }, + }) + .expect(200); + + expect(Array.isArray(item.inputs)).to.be(false); + }); + + it('should succeed and return arrayed inputs when the format=legacy query param is passed', async function () { + const { + body: { item }, + } = await supertest + .put(`/api/fleet/package_policies/${packagePolicyId}?format=legacy`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: `update-simplified-package-policy-with_required_variables-${Date.now()}`, + description: '', + namespace: 'default', + policy_id: agentPolicyId, + inputs: { + 'with_required_variables-test_input': { + streams: { + 'with_required_variables.log': { + vars: { test_var_required: 'I am required' }, + }, + }, + }, + }, + package: { + name: 'with_required_variables', + version: '0.1.0', + }, + }) + .expect(200); + + expect(Array.isArray(item.inputs)); + }); + + it('should return 400 if an invalid format query param is passed', async function () { + await supertest + .put(`/api/fleet/package_policies/${packagePolicyId}?format=foo`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: `update-simplified-package-policy-with_required_variables-${Date.now()}`, + description: '', + namespace: 'default', + policy_id: agentPolicyId, + inputs: { + 'with_required_variables-test_input': { + streams: { + 'with_required_variables.log': { + vars: { test_var_required: 'I am required' }, + }, + }, + }, + }, + package: { + name: 'with_required_variables', + version: '0.1.0', + }, + }) + .expect(400); + }); + it('should return 400 for custom packages updated to an agentless deployment', async () => { + const testCustomIntegrationName = 'test-custom-integration'; + await supertest + .post('/api/fleet/epm/custom_integrations') + .set('kbn-xsrf', 'xxxx') + .send({ + integrationName: testCustomIntegrationName, + force: true, + datasets: [{ type: 'logs', name: testCustomIntegrationName }], + }) + .expect(200); + + const createRes = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'test agentless custom package', + description: '', + namespace: 'default', + policy_ids: [agentPolicyId], + enabled: true, + inputs: [], + package: { + name: testCustomIntegrationName, + title: 'Test Custom Integration', + version: '1.0.0', + }, + }); + + expect(createRes.statusCode).equal(200); + const customPackagePolicyId = createRes.body.item.id; + + const res = await supertest + .put(`/api/fleet/package_policies/${customPackagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'test agentless custom package', + description: '', + namespace: 'default', + policy_ids: [agentPolicyId], + enabled: true, + inputs: [], + package: { + name: testCustomIntegrationName, + title: 'Test Custom Integration', + version: '1.0.0', + }, + supports_agentless: true, + }); + + expect(res.statusCode).equal(400); + expect(res.body.message).equal( + 'Cannot perform that action in Fleet because custom packages are not allowed to be deployed as agentless. Please choose a different deployment mode.' + ); + + // Associated agent policies that existed before agentless deployment update should NOT be deleted + await supertest.get(`/api/fleet/agent_policies/${agentPolicyId}`).expect(200); + }); + }); + + describe('Input Packages', () => { + it('should install index templates when upgrading from input package to integration package', async () => { + const { body: packagePolicyResponse } = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + policy_id: agentPolicyId, + force: true, + package: { + name: 'integration_to_input', + version: '1.0.0', + }, + name: 'integration_to_input-1', + description: '', + namespace: 'default', + inputs: { + 'logs-logfile': { + enabled: true, + streams: { + 'integration_to_input.log': { + enabled: true, + vars: { + paths: ['/tmp/test.log'], + 'data_stream.dataset': 'somedataset', + custom: '', + }, + }, + }, + }, + }, + }); + + const inputPackagePolicyId = packagePolicyResponse.item.id; + + await supertest + .put(`/api/fleet/package_policies/${inputPackagePolicyId}`) + .set('kbn-xsrf', 'xxxx') + .send({ + package: { + name: 'integration_to_input', + version: '2.0.0', + experimental_data_stream_features: [], + }, + name: 'integration_to_input-1', + namespace: 'default', + description: '', + policy_id: agentPolicyId, + vars: {}, + inputs: { + 'logs-logfile': { + enabled: true, + streams: { + 'integration_to_input.logs': { + enabled: true, + vars: { + paths: ['/tmp/test.log'], + 'data_stream.dataset': 'somedataset', + tags: ['tag1'], + ignore_older: '72h', + }, + }, + }, + }, + }, + }) + .expect(200); + + const installation = await getInstallationInfo(supertest, 'integration_to_input', '2.0.0'); + + expectIdArraysEqual(installation.installed_es, [ + // assets from version 1.0.0 + { id: 'logs-integration_to_input.log', type: 'index_template' }, + { id: 'logs-integration_to_input.log-1.0.0', type: 'ingest_pipeline' }, + { id: 'logs-integration_to_input.log@custom', type: 'component_template' }, + { id: 'logs-integration_to_input.log@package', type: 'component_template' }, + // assets from version 2.0.0 for new package policy + { id: 'logs-somedataset-2.0.0', type: 'ingest_pipeline' }, + { id: 'logs-somedataset', type: 'index_template' }, + { id: 'logs-somedataset@package', type: 'component_template' }, + { id: 'logs-somedataset@custom', type: 'component_template' }, + { id: 'logs@custom', type: 'component_template' }, + { id: 'integration_to_input@custom', type: 'component_template' }, + ]); + + const dataset3PkgComponentTemplate = await getComponentTemplate('logs-somedataset@package'); + expect(dataset3PkgComponentTemplate).not.to.be(null); + }); + }); + }); +} diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts b/x-pack/platform/test/fleet_api_integration/apis/package_policy/upgrade.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts rename to x-pack/platform/test/fleet_api_integration/apis/package_policy/upgrade.ts diff --git a/x-pack/test/fleet_api_integration/apis/policy_secrets.ts b/x-pack/platform/test/fleet_api_integration/apis/policy_secrets.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/policy_secrets.ts rename to x-pack/platform/test/fleet_api_integration/apis/policy_secrets.ts diff --git a/x-pack/test/fleet_api_integration/apis/service_tokens.ts b/x-pack/platform/test/fleet_api_integration/apis/service_tokens.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/service_tokens.ts rename to x-pack/platform/test/fleet_api_integration/apis/service_tokens.ts diff --git a/x-pack/test/fleet_api_integration/apis/settings/enrollment.ts b/x-pack/platform/test/fleet_api_integration/apis/settings/enrollment.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/settings/enrollment.ts rename to x-pack/platform/test/fleet_api_integration/apis/settings/enrollment.ts diff --git a/x-pack/test/fleet_api_integration/apis/settings/enrollment_privileges.ts b/x-pack/platform/test/fleet_api_integration/apis/settings/enrollment_privileges.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/settings/enrollment_privileges.ts rename to x-pack/platform/test/fleet_api_integration/apis/settings/enrollment_privileges.ts diff --git a/x-pack/test/fleet_api_integration/apis/settings/get.ts b/x-pack/platform/test/fleet_api_integration/apis/settings/get.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/settings/get.ts rename to x-pack/platform/test/fleet_api_integration/apis/settings/get.ts diff --git a/x-pack/test/fleet_api_integration/apis/settings/index.js b/x-pack/platform/test/fleet_api_integration/apis/settings/index.js similarity index 100% rename from x-pack/test/fleet_api_integration/apis/settings/index.js rename to x-pack/platform/test/fleet_api_integration/apis/settings/index.js diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/actions.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/actions.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/actions.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/actions.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/agent_policies.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/agent_policies.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/agent_policies.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/agent_policies.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/agent_policies_side_effects.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/agent_policies_side_effects.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/agent_policies_side_effects.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/agent_policies_side_effects.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/agents.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/agents.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/agents.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/agents.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/api_helper.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/api_helper.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/api_helper.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/api_helper.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/change_space_agent_policies.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/change_space_agent_policies.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/change_space_agent_policies.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/change_space_agent_policies.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/enrollment_api_keys.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/enrollment_api_keys.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/enrollment_api_keys.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/enrollment_api_keys.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/enrollment_settings.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/enrollment_settings.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/enrollment_settings.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/enrollment_settings.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/helpers.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/helpers.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/helpers.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/helpers.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/index.js b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/index.js similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/index.js rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/index.js diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/outputs.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/outputs.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/outputs.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/outputs.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/package_install.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/package_install.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/package_install.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/package_install.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/space_awareness_migration.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/space_awareness_migration.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/space_awareness_migration.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/space_awareness_migration.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/space_settings.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/space_settings.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/space_settings.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/space_settings.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/telemetry.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/telemetry.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/telemetry.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/telemetry.ts diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/uninstall_tokens.ts b/x-pack/platform/test/fleet_api_integration/apis/space_awareness/uninstall_tokens.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/space_awareness/uninstall_tokens.ts rename to x-pack/platform/test/fleet_api_integration/apis/space_awareness/uninstall_tokens.ts diff --git a/x-pack/platform/test/fleet_api_integration/apis/test_users.ts b/x-pack/platform/test/fleet_api_integration/apis/test_users.ts new file mode 100644 index 0000000000000..51813d9f0b52a --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/apis/test_users.ts @@ -0,0 +1,200 @@ +/* + * 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 type { SecurityService } from '@kbn/ftr-common-functional-services'; + +export const testUsers: { + [rollName: string]: { username: string; password: string; permissions?: any }; +} = { + fleet_all_int_all: { + permissions: { + feature: { + fleetv2: ['all'], + fleet: ['all'], + }, + spaces: ['*'], + }, + username: 'fleet_all_int_all', + password: 'changeme', + }, + fleet_all_int_all_default_space_only: { + permissions: { + feature: { + fleetv2: ['all'], + fleet: ['all'], + }, + spaces: ['default'], + }, + username: 'fleet_all_int_all_default_space_only', + password: 'changeme', + }, + fleet_read_only: { + permissions: { + feature: { + fleetv2: ['read'], + }, + spaces: ['*'], + }, + username: 'fleet_read_only', + password: 'changeme', + }, + fleet_minimal_all_only: { + permissions: { + feature: { + fleetv2: ['minimal_all'], + }, + spaces: ['*'], + }, + username: 'fleet_minimal_all_only', + password: 'changeme', + }, + fleet_minimal_read_only: { + permissions: { + feature: { + fleetv2: ['minimal_read'], + }, + spaces: ['*'], + }, + username: 'fleet_minimal_read_only', + password: 'changeme', + }, + fleet_agents_read_only: { + permissions: { + feature: { + fleetv2: ['agents_read'], + }, + spaces: ['*'], + }, + username: 'fleet_agents_read_only', + password: 'changeme', + }, + fleet_agents_all_only: { + permissions: { + feature: { + fleetv2: ['agents_all'], + }, + spaces: ['*'], + }, + username: 'fleet_agents_all_only', + password: 'changeme', + }, + fleet_settings_read_only: { + permissions: { + feature: { + fleetv2: ['settings_read'], + }, + spaces: ['*'], + }, + username: 'fleet_settings_read_only', + password: 'changeme', + }, + fleet_settings_all_only: { + permissions: { + feature: { + fleetv2: ['settings_all'], + }, + spaces: ['*'], + }, + username: 'fleet_settings_all_only', + password: 'changeme', + }, + fleet_agent_policies_read_only: { + permissions: { + feature: { + fleetv2: ['agent_policies_read'], + }, + spaces: ['*'], + }, + username: 'fleet_agent_policies_read_only', + password: 'changeme', + }, + fleet_agent_policies_all_only: { + permissions: { + feature: { + fleetv2: ['agent_policies_all'], + }, + spaces: ['*'], + }, + username: 'fleet_agent_policies_all_only', + password: 'changeme', + }, + setup: { + permissions: { + feature: { + fleetv2: ['all', 'setup'], + fleet: ['all'], + }, + spaces: ['*'], + }, + username: 'setup', + password: 'changeme', + }, + fleet_no_access: { + permissions: { + feature: { + dashboards: ['read'], + }, + spaces: ['*'], + }, + username: 'fleet_no_access', + password: 'changeme', + }, + fleet_all_only: { + permissions: { + feature: { + fleetv2: ['all'], + }, + spaces: ['*'], + }, + username: 'fleet_all_only', + password: 'changeme', + }, + fleet_all_int_read: { + permissions: { + feature: { + fleetv2: ['all'], + fleet: ['read'], + }, + spaces: ['*'], + }, + username: 'fleet_all_int_read', + password: 'changeme', + }, + integr_all_only: { + permissions: { + feature: { + fleet: ['all'], + }, + spaces: ['*'], + }, + username: 'integr_all', + password: 'changeme', + }, +}; + +export const setupTestUsers = async (security: SecurityService, spaceAwarenessEnabled = false) => { + for (const roleName in testUsers) { + if (!spaceAwarenessEnabled && roleName === 'fleet_all_int_all_default_space_only') { + continue; + } + if (Object.hasOwn(testUsers, roleName)) { + const user = testUsers[roleName]; + + if (user.permissions) { + await security.role.create(roleName, { + kibana: [user.permissions], + }); + } + + await security.user.create(user.username, { + password: user.password, + roles: [roleName], + full_name: user.username, + }); + } + } +}; diff --git a/x-pack/test/fleet_api_integration/apis/uninstall_token/get.ts b/x-pack/platform/test/fleet_api_integration/apis/uninstall_token/get.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/uninstall_token/get.ts rename to x-pack/platform/test/fleet_api_integration/apis/uninstall_token/get.ts diff --git a/x-pack/test/fleet_api_integration/apis/uninstall_token/privileges.ts b/x-pack/platform/test/fleet_api_integration/apis/uninstall_token/privileges.ts similarity index 100% rename from x-pack/test/fleet_api_integration/apis/uninstall_token/privileges.ts rename to x-pack/platform/test/fleet_api_integration/apis/uninstall_token/privileges.ts diff --git a/x-pack/platform/test/fleet_api_integration/config.agent.ts b/x-pack/platform/test/fleet_api_integration/config.agent.ts new file mode 100644 index 0000000000000..cfc4b3d73f255 --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/config.agent.ts @@ -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', + }, + }; +} diff --git a/x-pack/test/fleet_api_integration/config.agent_policy.ts b/x-pack/platform/test/fleet_api_integration/config.agent_policy.ts similarity index 100% rename from x-pack/test/fleet_api_integration/config.agent_policy.ts rename to x-pack/platform/test/fleet_api_integration/config.agent_policy.ts diff --git a/x-pack/test/fleet_api_integration/config.base.ts b/x-pack/platform/test/fleet_api_integration/config.base.ts similarity index 100% rename from x-pack/test/fleet_api_integration/config.base.ts rename to x-pack/platform/test/fleet_api_integration/config.base.ts diff --git a/x-pack/platform/test/fleet_api_integration/config.epm.ts b/x-pack/platform/test/fleet_api_integration/config.epm.ts new file mode 100644 index 0000000000000..1e9132a4e60d3 --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/config.epm.ts @@ -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', + }, + }; +} diff --git a/x-pack/test/fleet_api_integration/config.event_ingested.ts b/x-pack/platform/test/fleet_api_integration/config.event_ingested.ts similarity index 100% rename from x-pack/test/fleet_api_integration/config.event_ingested.ts rename to x-pack/platform/test/fleet_api_integration/config.event_ingested.ts diff --git a/x-pack/test/fleet_api_integration/config.fleet.ts b/x-pack/platform/test/fleet_api_integration/config.fleet.ts similarity index 100% rename from x-pack/test/fleet_api_integration/config.fleet.ts rename to x-pack/platform/test/fleet_api_integration/config.fleet.ts diff --git a/x-pack/platform/test/fleet_api_integration/config.package_policy.ts b/x-pack/platform/test/fleet_api_integration/config.package_policy.ts new file mode 100644 index 0000000000000..444c9576b458b --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/config.package_policy.ts @@ -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', + }, + }; +} diff --git a/x-pack/test/fleet_api_integration/config.space_awareness.ts b/x-pack/platform/test/fleet_api_integration/config.space_awareness.ts similarity index 100% rename from x-pack/test/fleet_api_integration/config.space_awareness.ts rename to x-pack/platform/test/fleet_api_integration/config.space_awareness.ts diff --git a/x-pack/platform/test/fleet_api_integration/helpers.ts b/x-pack/platform/test/fleet_api_integration/helpers.ts new file mode 100644 index 0000000000000..69255def31700 --- /dev/null +++ b/x-pack/platform/test/fleet_api_integration/helpers.ts @@ -0,0 +1,231 @@ +/* + * 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 * as uuid from 'uuid'; +import { ToolingLog } from '@kbn/tooling-log'; +import { agentPolicyRouteService } from '@kbn/fleet-plugin/common/services'; +import { GLOBAL_SETTINGS_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common/constants'; +import { + AgentPolicy, + CreateAgentPolicyRequest, + CreateAgentPolicyResponse, +} from '@kbn/fleet-plugin/common'; +import { KbnClient } from '@kbn/test'; +import { UNINSTALL_TOKENS_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; +import { Agent as SuperTestAgent } from 'supertest'; +import { FtrProviderContext } from '../api_integration/ftr_provider_context'; + +export function warnAndSkipTest(mochaContext: Mocha.Context, log: ToolingLog) { + log.warning( + 'disabling tests because DockerServers service is not enabled, set FLEET_PACKAGE_REGISTRY_PORT to run them' + ); + mochaContext.skip(); +} + +export function isDockerRegistryEnabledOrSkipped(providerContext: FtrProviderContext) { + if (process.env.FLEET_SKIP_RUNNING_PACKAGE_REGISTRY === 'true') { + return true; + } + + const { getService } = providerContext; + const dockerServers = getService('dockerServers'); + const server = dockerServers.get('registry'); + + return server.enabled; +} + +export function skipIfNoDockerRegistry(providerContext: FtrProviderContext) { + const { getService } = providerContext; + const dockerServers = getService('dockerServers'); + + if (process.env.FLEET_SKIP_RUNNING_PACKAGE_REGISTRY === 'true') { + return; + } + + const server = dockerServers.get('registry'); + const log = getService('log'); + + beforeEach(function beforeSetupWithDockerRegistry() { + if (!server.enabled) { + warnAndSkipTest(this, log); + } + }); +} + +export const makeSnapshotVersion = (version: string) => { + return version.endsWith('-SNAPSHOT') ? version : `${version}-SNAPSHOT`; +}; + +export async function generateAgent( + providerContext: FtrProviderContext, + status: string, + id: string, + policyId: string, + version?: string, + upgradeDetails?: any +) { + let data: any = {}; + const { getService } = providerContext; + const es = getService('es'); + + switch (status) { + case 'error': + data = { policy_revision_idx: 1, last_checkin_status: 'error' }; + break; + case 'degraded': + data = { policy_revision_idx: 1, last_checkin_status: 'degraded' }; + break; + case 'offline': + // default inactivity timeout is 2 weeks + // anything less + above offline timeout will be offline + const oneWeekAgoTimestamp = new Date().getTime() - 7 * 24 * 60 * 60 * 1000; + data = { policy_revision_idx: 1, last_checkin: new Date(oneWeekAgoTimestamp).toISOString() }; + break; + case 'inactive': + const threeWeeksAgoTimestamp = new Date().getTime() - 21 * 24 * 60 * 60 * 1000; + data = { + policy_revision_idx: 1, + last_checkin: new Date(threeWeeksAgoTimestamp).toISOString(), + }; + break; + // Agent with last checkin status as error and currently unenrolling => should displayd updating status + case 'error-unenrolling': + data = { + policy_revision_idx: 1, + last_checkin_status: 'error', + unenrollment_started_at: '2017-06-07T18:59:04.498Z', + }; + break; + case 'uninstalled': + data = { + audit_unenrolled_reason: 'uninstall', + policy_revision_idx: 1, + last_checkin: new Date().toISOString(), + }; + break; + default: + data = { policy_revision_idx: 1, last_checkin: new Date().toISOString() }; + } + + await es.index({ + index: '.fleet-agents', + id, + document: { + id, + type: 'PERMANENT', + active: true, + enrolled_at: new Date().toISOString(), + last_checkin: new Date().toISOString(), + policy_id: policyId, + policy_revision: 1, + agent: { + id, + version, + }, + local_metadata: { + elastic: { + agent: { + version, + upgradeable: true, + }, + }, + }, + ...data, + ...(upgradeDetails ? { upgrade_details: upgradeDetails } : {}), + }, + refresh: 'wait_for', + }); +} + +export function setPrereleaseSetting(supertest: SuperTestAgent) { + before(async () => { + await supertest + .put('/api/fleet/settings') + .set('kbn-xsrf', 'xxxx') + .send({ prerelease_integrations_enabled: true }); + }); + + after(async () => { + await supertest + .put('/api/fleet/settings') + .set('kbn-xsrf', 'xxxx') + .send({ prerelease_integrations_enabled: false }); + }); +} + +export async function enableSecrets(providerContext: FtrProviderContext) { + const settingsSO = await providerContext + .getService('kibanaServer') + .savedObjects.get({ type: GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, id: 'fleet-default-settings' }) + .catch((err) => {}); + + if (settingsSO) { + await providerContext.getService('kibanaServer').savedObjects.update({ + type: GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, + id: 'fleet-default-settings', + attributes: { + secret_storage_requirements_met: true, + }, + overwrite: false, + }); + } else { + await providerContext.getService('kibanaServer').savedObjects.create({ + type: GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, + id: 'fleet-default-settings', + attributes: { + secret_storage_requirements_met: true, + }, + overwrite: true, + }); + } +} + +export const generateNAgentPolicies = async ( + supertest: SuperTestAgent, + number: number, + overwrite?: Partial +): Promise => { + const agentPolicyPromises: Array> = []; + + for (let i = 0; i < number; i++) { + agentPolicyPromises.push(generateAgentPolicy(supertest, overwrite)); + } + + const agentPolicies = await Promise.all(agentPolicyPromises); + + return agentPolicies; +}; + +export const generateAgentPolicy = async ( + supertest: SuperTestAgent, + overwrite?: Partial +): Promise => { + const response = await supertest + .post(agentPolicyRouteService.getCreatePath()) + .set('kbn-xsrf', 'xxxx') + .send({ name: `Agent Policy ${uuid.v4()}`, namespace: 'default', ...overwrite }) + .expect(200); + + return (response.body as CreateAgentPolicyResponse).item; +}; + +export const addUninstallTokenToPolicy = async ( + kibanaServer: KbnClient, + policyId: string, + token: string +) => { + const savedObject = await kibanaServer.savedObjects.create({ + type: UNINSTALL_TOKENS_SAVED_OBJECT_TYPE, + attributes: { + policy_id: policyId, + token, + }, + overwrite: false, + }); + + return savedObject.id; +}; diff --git a/x-pack/test/fleet_api_integration/privileges_helpers.ts b/x-pack/platform/test/fleet_api_integration/privileges_helpers.ts similarity index 100% rename from x-pack/test/fleet_api_integration/privileges_helpers.ts rename to x-pack/platform/test/fleet_api_integration/privileges_helpers.ts diff --git a/x-pack/test/fleet_api_integration/apis/agents/index.js b/x-pack/test/fleet_api_integration/apis/agents/index.js index 7a3a7d2d592ab..066f1e6eee423 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/index.js +++ b/x-pack/test/fleet_api_integration/apis/agents/index.js @@ -12,21 +12,6 @@ export default function loadTests({ loadTestFile, getService }) { before(async () => { await setupTestUsers(getService('security')); }); - loadTestFile(require.resolve('./delete')); - loadTestFile(require.resolve('./list')); - loadTestFile(require.resolve('./unenroll')); - loadTestFile(require.resolve('./actions')); - loadTestFile(require.resolve('./upgrade')); - loadTestFile(require.resolve('./action_status')); - loadTestFile(require.resolve('./reassign')); loadTestFile(require.resolve('./status')); - loadTestFile(require.resolve('./update')); - loadTestFile(require.resolve('./update_agent_tags')); - loadTestFile(require.resolve('./available_versions')); - loadTestFile(require.resolve('./request_diagnostics')); - loadTestFile(require.resolve('./uploads')); - loadTestFile(require.resolve('./get_agents_by_actions')); - loadTestFile(require.resolve('./privileges')); - loadTestFile(require.resolve('./migrate')); }); } diff --git a/x-pack/test/fleet_api_integration/apis/agents/status.ts b/x-pack/test/fleet_api_integration/apis/agents/status.ts index 78261ad959c16..6c528a3cd0c32 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/status.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/status.ts @@ -19,7 +19,8 @@ export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const superTestWithoutAuth = getService('supertestWithoutAuth'); - describe('fleet_agents_status', () => { + // Failed test: https://github.com/elastic/kibana/issues/228565 + describe.skip('fleet_agents_status', () => { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/fleet/agents'); await es.create({ diff --git a/x-pack/test/fleet_api_integration/apis/epm/get.ts b/x-pack/test/fleet_api_integration/apis/epm/get.ts index bd7cdbc1ff192..fb4b8edad5db3 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/get.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/get.ts @@ -6,25 +6,17 @@ */ import expect from '@kbn/expect'; -import { PackageInfo } from '@kbn/fleet-plugin/common/types/models/epm'; -import fs from 'fs'; -import path from 'path'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; import { testUsers } from '../test_users'; -import { bundlePackage, removeBundledPackages } from './install_bundled'; export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; const supertest = getService('supertest'); - const es = getService('es'); const supertestWithoutAuth = getService('supertestWithoutAuth'); const fleetAndAgents = getService('fleetAndAgents'); - const testPkgName = 'apache'; - const testPkgVersion = '0.1.4'; - const log = getService('log'); const uninstallPackage = async (name: string, version: string) => { await supertest.delete(`/api/fleet/epm/packages/${name}/${version}`).set('kbn-xsrf', 'xxxx'); @@ -36,23 +28,6 @@ export default function (providerContext: FtrProviderContext) { .send({ force: true }); }; - const testPkgArchiveZip = path.join( - path.dirname(__filename), - '../fixtures/direct_upload_packages/apache_0.1.4.zip' - ); - - async function uploadPackage(zipPackage: string) { - // wait 10s before uploading again to avoid getting 429 - await new Promise((resolve) => setTimeout(resolve, 10000)); - const buf = fs.readFileSync(zipPackage); - return await supertest - .post(`/api/fleet/epm/packages`) - .set('kbn-xsrf', 'xxxx') - .type('application/zip') - .send(buf) - .expect(200); - } - describe('EPM - get', () => { skipIfNoDockerRegistry(providerContext); @@ -60,277 +35,35 @@ export default function (providerContext: FtrProviderContext) { await fleetAndAgents.setup(); }); - it('returns package info from the registry if it was installed from the registry', async function () { - // this will install through the registry by default - await installPackage(testPkgName, testPkgVersion); - const res = await supertest - .get(`/api/fleet/epm/packages/${testPkgName}/${testPkgVersion}`) - .expect(200); - const packageInfo = res.body.item; - // the uploaded version will have this description - expect(packageInfo.description).to.not.equal('Apache Uploaded Test Integration'); - // download property should exist - expect(packageInfo.download).to.not.equal(undefined); - await uninstallPackage(testPkgName, testPkgVersion); - }); - - it('returns correct package info if it was installed by upload', async function () { - await uploadPackage(testPkgArchiveZip); - - const res = await supertest - .get(`/api/fleet/epm/packages/${testPkgName}/${testPkgVersion}`) - .expect(200); - const packageInfo = res.body.item; - // Get package info always return data from the registry - expect(packageInfo.description).to.not.equal('Apache Uploaded Test Integration'); - // download property exist on uploaded packages - expect(packageInfo.download).to.not.equal(undefined); - await uninstallPackage(testPkgName, testPkgVersion); - }); - - it('returns correct package info from registry if a different version is installed by upload', async function () { - await uploadPackage(testPkgArchiveZip); - - const res = await supertest.get(`/api/fleet/epm/packages/apache/0.1.3`).expect(200); - const packageInfo = res.body.item; - expect(packageInfo.description).to.equal('Apache Integration'); - expect(packageInfo.download).to.not.equal(undefined); - await uninstallPackage(testPkgName, testPkgVersion); - }); - - it('returns correct package info from upload if a uploaded version is not in registry', async function () { - const testPkgArchiveZipV9999 = path.join( - path.dirname(__filename), - '../fixtures/direct_upload_packages/apache_9999.0.0.zip' - ); - await uploadPackage(testPkgArchiveZipV9999); - - const res = await supertest.get(`/api/fleet/epm/packages/apache/9999.0.0`).expect(200); - const packageInfo = res.body.item; - expect(packageInfo.description).to.equal('Apache Uploaded Test Integration'); - expect(packageInfo.download).to.equal(undefined); - await uninstallPackage(testPkgName, '9999.0.0'); - }); - - describe('Installed Packages', () => { - before(async () => { - await installPackage(testPkgName, testPkgVersion); - await installPackage('experimental', '0.1.0'); - await bundlePackage('endpoint-8.6.1'); - await installPackage('endpoint', '8.6.1'); - await es.index({ - index: 'logs-apache.access-default', - document: { - '@timestamp': new Date().toISOString(), - }, - refresh: 'wait_for', - }); - }); - after(async () => { - await uninstallPackage(testPkgName, testPkgVersion); - await uninstallPackage('experimental', '0.1.0'); - await uninstallPackage('endpoint', '8.6.1'); - await removeBundledPackages(log); - await es.indices.deleteDataStream({ - name: 'logs-apache.access-default', - }); - }); - it('Allows the fetching of installed packages', async () => { - const res = await supertest.get(`/api/fleet/epm/packages/installed`).expect(200); - const packages = res.body.items; - const packageNames = packages.map((pkg: any) => pkg.name); - expect(packageNames).to.contain('apache'); - expect(packageNames).to.contain('endpoint'); - expect(packageNames).to.contain('experimental'); - expect(packageNames.length).to.be(3); - }); - it('Can be limited with perPage', async () => { - const res = await supertest.get(`/api/fleet/epm/packages/installed?perPage=2`).expect(200); - const packages = res.body.items; - expect(packages.length).to.be(2); - }); - it('Can be queried by dataStreamType', async () => { - const res = await supertest - .get(`/api/fleet/epm/packages/installed?dataStreamType=metrics`) - .expect(200); - const packages = res.body.items; - let dataStreams = [] as any; - packages.forEach((packageItem: any) => { - dataStreams = dataStreams.concat(packageItem.dataStreams); - }); - const streamsWithWrongType = dataStreams.filter((stream: any) => { - return !stream.name.startsWith('metrics-'); - }); - expect(streamsWithWrongType.length).to.be(0); - }); - it('Can be sorted', async () => { - const ascRes = await supertest - .get(`/api/fleet/epm/packages/installed?sortOrder=asc`) - .expect(200); - const ascPackages = ascRes.body.items; - expect(ascPackages[0].name).to.be('apache'); - - const descRes = await supertest - .get(`/api/fleet/epm/packages/installed?sortOrder=desc`) - .expect(200); - const descPackages = descRes.body.items; - expect(descPackages[0].name).to.be('experimental'); - }); - it('Can be filtered by name', async () => { - const res = await supertest - .get(`/api/fleet/epm/packages/installed?nameQuery=experimental`) - .expect(200); - const packages = res.body.items; - expect(packages.length).to.be(1); - expect(packages[0].name).to.be('experimental'); - }); - it('Can be to only return active datastreams', async () => { - const res = await supertest - .get(`/api/fleet/epm/packages/installed?nameQuery=apache&showOnlyActiveDataStreams=true`) - .expect(200); - const packages = res.body.items; - expect(packages.length).to.be(1); - expect(packages[0].name).to.be('apache'); - expect(packages[0].dataStreams.length).to.be(1); - expect(packages[0].dataStreams[0].name).to.be('logs-apache.access-*'); - }); - }); - it('rejects user does not have access to data streams', async function () { - const response = await supertestWithoutAuth - .get(`/api/fleet/epm/packages/installed?showOnlyActiveDataStreams=true`) - .auth(testUsers.fleet_all_int_all.username, testUsers.fleet_all_int_all.password) - .expect(403); - expect(response.body.message).to.contain('Unauthorized to query fleet datastreams'); - }); - it('returns a 404 for a package that do not exists', async function () { - await supertest.get('/api/fleet/epm/packages/notexists/99.99.99').expect(404); - }); - - it('returns a 400 for a package key without a proper semver version', async function () { - await supertest.get('/api/fleet/epm/packages/endpoint/0.1.0.1.2.3').expect(400); - }); - - it('allows user with only fleet permission to access', async () => { - await supertestWithoutAuth - .get(`/api/fleet/epm/packages/${testPkgName}/${testPkgVersion}`) - .auth(testUsers.fleet_all_only.username, testUsers.fleet_all_only.password) - .expect(200); - }); - it('allows user with only integrations permission to access', async () => { - await supertestWithoutAuth - .get(`/api/fleet/epm/packages/${testPkgName}/${testPkgVersion}`) - .auth(testUsers.integr_all_only.username, testUsers.integr_all_only.password) - .expect(200); - }); - it('allows user with integrations read permission to access', async () => { - await supertestWithoutAuth - .get(`/api/fleet/epm/packages/${testPkgName}/${testPkgVersion}`) - .auth(testUsers.fleet_all_int_read.username, testUsers.fleet_all_int_read.password) - .expect(200); - }); - - it('returns package info in item field when calling without version', async function () { - // this will install through the registry by default - await installPackage(testPkgName, testPkgVersion); - const res = await supertest - .get(`/api/fleet/epm/packages/${testPkgName}`) - .set('kbn-xsrf', 'xxxx') - .expect(200); - const packageInfo = res.body.item; - // the uploaded version will have this description - expect(packageInfo.name).to.equal('apache'); - await uninstallPackage(testPkgName, testPkgVersion); - }); - it('should return all fields for input only packages', async function () { - // input packages have to get their package info from the manifest directly - // not from the package registry. This is because they contain a field the registry - // does not support - const res = await supertest - .get(`/api/fleet/epm/packages/integration_to_input/2.0.0`) - .expect(200); - - const packageInfo = res.body.item; - expect(packageInfo.policy_templates.length).to.equal(1); - expect(packageInfo.policy_templates[0].vars).not.to.be(undefined); - }); describe('Pkg verification', () => { - it('should return validation error for unverified input only pkg', async function () { - const res = await supertest - .get(`/api/fleet/epm/packages/input_only/0.1.0?prerelease=true`) - .expect(400); - const error = res.body; - - expect(error?.attributes?.type).to.equal('verification_failed'); - }); - it('should not return validation error for unverified input only pkg if ignoreUnverified is true', async function () { - await supertest - .get(`/api/fleet/epm/packages/input_only/0.1.0?ignoreUnverified=true&prerelease=true`) + it('allows user with only package level permission to access corresponding packages', async function () { + const pkg = 'endpoint'; + const pkgVersion = '8.6.0'; + await installPackage(pkg, pkgVersion); + const response = await supertestWithoutAuth + .get(`/api/fleet/epm/packages/${pkg}/${pkgVersion}`) + .auth( + testUsers.endpoint_integr_read_only_fleet_none.username, + testUsers.endpoint_integr_read_only_fleet_none.password + ) .expect(200); + expect(response.body.item.name).to.be(pkg); + expect(response.body.item.version).to.be(pkgVersion); + await uninstallPackage(pkg, pkgVersion); }); - }); - it('returns package info from the archive if ?full=true', async function () { - const res = await supertest - .get(`/api/fleet/epm/packages/non_epr_fields/1.0.0?full=true`) - .expect(200); - const packageInfo = res.body.item as PackageInfo; - expect(packageInfo?.data_streams?.length).equal(3); - const dataStream = packageInfo?.data_streams?.find( - ({ dataset }) => dataset === 'non_epr_fields.test_metrics_2' - ); - expect(dataStream?.elasticsearch?.source_mode).equal('default'); - }); - it('returns package info from the registry if ?full=false', async function () { - const res = await supertest - .get(`/api/fleet/epm/packages/non_epr_fields/1.0.0?full=false`) - .expect(200); - const packageInfo = res.body.item as PackageInfo; - expect(packageInfo?.data_streams?.length).equal(3); - const dataStream = packageInfo?.data_streams?.find( - ({ dataset }) => dataset === 'non_epr_fields.test_metrics_2' - ); - // this field is only returned if we go to the archive - // it is not part of the EPR API - expect(dataStream?.elasticsearch?.source_mode).equal(undefined); - }); - it('returns package info from the registry if ?full not provided', async function () { - const res = await supertest - .get(`/api/fleet/epm/packages/non_epr_fields/1.0.0?full=false`) - .expect(200); - const packageInfo = res.body.item as PackageInfo; - expect(packageInfo?.data_streams?.length).equal(3); - const dataStream = packageInfo?.data_streams?.find( - ({ dataset }) => dataset === 'non_epr_fields.test_metrics_2' - ); - expect(dataStream?.elasticsearch?.source_mode).equal(undefined); - }); - it('allows user with only package level permission to access corresponding packages', async function () { - const pkg = 'endpoint'; - const pkgVersion = '8.6.0'; - await installPackage(pkg, pkgVersion); - const response = await supertestWithoutAuth - .get(`/api/fleet/epm/packages/${pkg}/${pkgVersion}`) - .auth( - testUsers.endpoint_integr_read_only_fleet_none.username, - testUsers.endpoint_integr_read_only_fleet_none.password - ) - .expect(200); - expect(response.body.item.name).to.be(pkg); - expect(response.body.item.version).to.be(pkgVersion); - await uninstallPackage(pkg, pkgVersion); - }); - - it('rejects user with only package level permission to access unauthorized packages', async function () { - const response = await supertestWithoutAuth - .get(`/api/fleet/epm/packages/${testPkgName}`) - .auth( - testUsers.endpoint_integr_read_only_fleet_none.username, - testUsers.endpoint_integr_read_only_fleet_none.password - ) - .expect(403); - expect(response.body.message).to.be( - 'Authorization denied to package: apache. Allowed package(s): endpoint' - ); + it('rejects user with only package level permission to access unauthorized packages', async function () { + const response = await supertestWithoutAuth + .get(`/api/fleet/epm/packages/${testPkgName}`) + .auth( + testUsers.endpoint_integr_read_only_fleet_none.username, + testUsers.endpoint_integr_read_only_fleet_none.password + ) + .expect(403); + expect(response.body.message).to.be( + 'Authorization denied to package: apache. Allowed package(s): endpoint' + ); + }); }); }); } diff --git a/x-pack/test/fleet_api_integration/apis/epm/index.js b/x-pack/test/fleet_api_integration/apis/epm/index.js index 694fe04e5228d..99264e9448975 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/index.js +++ b/x-pack/test/fleet_api_integration/apis/epm/index.js @@ -12,46 +12,6 @@ export default function loadTests({ loadTestFile, getService }) { before(async () => { await setupTestUsers(getService('security')); }); - loadTestFile(require.resolve('./delete')); - loadTestFile(require.resolve('./list')); - loadTestFile(require.resolve('./setup')); loadTestFile(require.resolve('./get')); - loadTestFile(require.resolve('./file')); - loadTestFile(require.resolve('./template')); - loadTestFile(require.resolve('./ilm')); - loadTestFile(require.resolve('./install_bundled')); - loadTestFile(require.resolve('./install_by_upload')); - loadTestFile(require.resolve('./install_custom')); - loadTestFile(require.resolve('./install_endpoint')); - loadTestFile(require.resolve('./install_overrides')); - loadTestFile(require.resolve('./install_prerelease')); - loadTestFile(require.resolve('./install_remove_assets')); - loadTestFile(require.resolve('./install_remove_kbn_assets_in_space')); - loadTestFile(require.resolve('./install_remove_multiple')); - loadTestFile(require.resolve('./install_update')); - loadTestFile(require.resolve('./install_tsds_disable')); - loadTestFile(require.resolve('./install_tag_assets')); - loadTestFile(require.resolve('./install_with_streaming')); - loadTestFile(require.resolve('./bulk_upgrade')); - loadTestFile(require.resolve('./bulk_uninstall')); - loadTestFile(require.resolve('./bulk_install_upgrade')); - loadTestFile(require.resolve('./bulk_install')); - loadTestFile(require.resolve('./update_assets')); - loadTestFile(require.resolve('./data_stream')); - loadTestFile(require.resolve('./package_install_complete')); - loadTestFile(require.resolve('./remove_legacy_templates')); - loadTestFile(require.resolve('./install_error_rollback')); - loadTestFile(require.resolve('./final_pipeline')); - loadTestFile(require.resolve('./custom_ingest_pipeline')); - loadTestFile(require.resolve('./verification_key_id')); - loadTestFile(require.resolve('./install_integration_in_multiple_spaces.ts')); - loadTestFile(require.resolve('./install_hidden_datastreams')); - loadTestFile(require.resolve('./bulk_get_assets')); - loadTestFile(require.resolve('./install_dynamic_template_metric')); - loadTestFile(require.resolve('./routing_rules')); - loadTestFile(require.resolve('./install_runtime_field')); - loadTestFile(require.resolve('./get_templates_inputs')); - loadTestFile(require.resolve('./data_views')); - loadTestFile(require.resolve('./custom_integrations')); }); } diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/docs/README.md b/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/docs/README.md deleted file mode 100644 index d6cfcce90527c..0000000000000 --- a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/filetest/0.1.0/docs/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# filetest - -This package contains randomly collected files from other packages to be used in API integration tests. - -It also serves as an example how to serve a package from the fixtures directory with the package registry docker container. For this, also see the `x-pack/test/fleet_api_integration/config.ts` how the `test_packages` directory is mounted into the docker container, and `x-pack/test/fleet_api_integration/apis/fixtures/package_registry_config.yml` how to pass the directory to the registry. diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/docs/README.md b/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/docs/README.md deleted file mode 100644 index d6cfcce90527c..0000000000000 --- a/x-pack/test/fleet_api_integration/apis/fixtures/test_packages/with_required_variables/0.1.0/docs/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# filetest - -This package contains randomly collected files from other packages to be used in API integration tests. - -It also serves as an example how to serve a package from the fixtures directory with the package registry docker container. For this, also see the `x-pack/test/fleet_api_integration/config.ts` how the `test_packages` directory is mounted into the docker container, and `x-pack/test/fleet_api_integration/apis/fixtures/package_registry_config.yml` how to pass the directory to the registry. diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/get.ts b/x-pack/test/fleet_api_integration/apis/package_policy/get.ts index 2bb93b2c55293..a24f4d3bc0a15 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/get.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/get.ts @@ -120,10 +120,6 @@ export default function (providerContext: FtrProviderContext) { await deleteEndpointPackage(); }); - it('should succeed with a valid id', async function () { - await supertest.get(`/api/fleet/package_policies/${packagePolicyId}`).expect(200); - }); - it('should succeed when requesting with policy ids that match package names allowed by package privileges', async function () { await superTestWithoutAuth .get(`/api/fleet/package_policies/${endpointPackagePolicyId}`) @@ -149,36 +145,6 @@ export default function (providerContext: FtrProviderContext) { message: 'Authorization denied to package: filetest. Allowed package(s): endpoint', }); }); - - it('should return a 404 with an invalid id', async function () { - await supertest.get(`/api/fleet/package_policies/IS_NOT_PRESENT`).expect(404); - }); - - it('should succeed and return formatted inputs when the format=simplified query param is passed', async function () { - const { - body: { item }, - } = await supertest - .get(`/api/fleet/package_policies/${packagePolicyId}?format=simplified`) - .expect(200); - - expect(Array.isArray(item.inputs)).to.be(false); - }); - - it('should succeed and return arrayed inputs when the format=legacy query param is passed', async function () { - const { - body: { item }, - } = await supertest - .get(`/api/fleet/package_policies/${packagePolicyId}?format=legacy`) - .expect(200); - - expect(Array.isArray(item.inputs)); - }); - - it('should return 400 if an invalid format query param is passed', async function () { - await supertest - .get(`/api/fleet/package_policies/${packagePolicyId}?format=foo`) - .expect(400); - }); }); describe('POST /api/fleet/package_policies/_bulk_get', function () { diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/index.js b/x-pack/test/fleet_api_integration/apis/package_policy/index.js index 8cb9cbd66a186..2c5386b4a0baa 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/index.js +++ b/x-pack/test/fleet_api_integration/apis/package_policy/index.js @@ -12,13 +12,7 @@ export default function loadTests({ loadTestFile, getService }) { 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')); - loadTestFile(require.resolve('./input_package_rollback')); }); } diff --git a/x-pack/test/fleet_api_integration/config.agent.ts b/x-pack/test/fleet_api_integration/config.agent.ts index cfc4b3d73f255..27b8385cbb347 100644 --- a/x-pack/test/fleet_api_integration/config.agent.ts +++ b/x-pack/test/fleet_api_integration/config.agent.ts @@ -8,13 +8,15 @@ import { FtrConfigProviderContext } from '@kbn/test'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const baseFleetApiConfig = await readConfigFile(require.resolve('./config.base.ts')); + const baseFleetApiConfig = await readConfigFile( + require.resolve('@kbn/test-suites-xpack-platform/fleet_api_integration/config.base') + ); return { ...baseFleetApiConfig.getAll(), testFiles: [require.resolve('./apis/agents')], junit: { - reportName: 'X-Pack Fleet Agent API Integration Tests', + reportName: 'X-Pack Security Solution Fleet Agent API Integration Tests', }, }; } diff --git a/x-pack/test/fleet_api_integration/config.epm.ts b/x-pack/test/fleet_api_integration/config.epm.ts index 1e9132a4e60d3..d83d9834457ad 100644 --- a/x-pack/test/fleet_api_integration/config.epm.ts +++ b/x-pack/test/fleet_api_integration/config.epm.ts @@ -8,13 +8,15 @@ import { FtrConfigProviderContext } from '@kbn/test'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const baseFleetApiConfig = await readConfigFile(require.resolve('./config.base.ts')); + const baseFleetApiConfig = await readConfigFile( + require.resolve('@kbn/test-suites-xpack-platform/fleet_api_integration/config.base') + ); return { ...baseFleetApiConfig.getAll(), testFiles: [require.resolve('./apis/epm')], junit: { - reportName: 'X-Pack EPM API Integration Tests', + reportName: 'X-Pack Security Solution EPM API Integration Tests', }, }; } diff --git a/x-pack/test/fleet_api_integration/config.package_policy.ts b/x-pack/test/fleet_api_integration/config.package_policy.ts index 444c9576b458b..618c555f614c8 100644 --- a/x-pack/test/fleet_api_integration/config.package_policy.ts +++ b/x-pack/test/fleet_api_integration/config.package_policy.ts @@ -8,13 +8,15 @@ import { FtrConfigProviderContext } from '@kbn/test'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const baseFleetApiConfig = await readConfigFile(require.resolve('./config.base.ts')); + const baseFleetApiConfig = await readConfigFile( + require.resolve('@kbn/test-suites-xpack-platform/fleet_api_integration/config.base') + ); return { ...baseFleetApiConfig.getAll(), testFiles: [require.resolve('./apis/package_policy')], junit: { - reportName: 'X-Pack Fleet Package Policy API Integration Tests', + reportName: 'X-Pack Security Solution Fleet Package Policy API Integration Tests', }, }; }