diff --git a/.buildkite/ftr_platform_stateful_configs.yml b/.buildkite/ftr_platform_stateful_configs.yml index f7c5a72c80432..3e564df591874 100644 --- a/.buildkite/ftr_platform_stateful_configs.yml +++ b/.buildkite/ftr_platform_stateful_configs.yml @@ -322,11 +322,11 @@ enabled: - x-pack/test/security_functional/user_profiles.config.ts - x-pack/test/security_functional/expired_session.config.ts - x-pack/test/session_view/basic/config.ts - - x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts - - x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_basic.ts - - x-pack/test/spaces_api_integration/security_and_spaces/config_trial.ts - - x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts - - x-pack/test/spaces_api_integration/spaces_only/config.ts + - x-pack/platform/test/spaces_api_integration/security_and_spaces/config_basic.ts + - x-pack/platform/test/spaces_api_integration/security_and_spaces/copy_to_space_config_basic.ts + - x-pack/platform/test/spaces_api_integration/security_and_spaces/config_trial.ts + - x-pack/platform/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts + - x-pack/platform/test/spaces_api_integration/spaces_only/config.ts - x-pack/platform/test/task_manager_claimer_update_by_query/config.ts - x-pack/platform/test/ui_capabilities/security_and_spaces/config.ts - x-pack/platform/test/ui_capabilities/spaces_only/config.ts diff --git a/.eslintrc.js b/.eslintrc.js index 1f399f5227295..3aa5bceac5c71 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1976,7 +1976,7 @@ module.exports = { 'x-pack/test/security_functional/**/*.{js,mjs,ts,tsx}', 'x-pack/platform/plugins/shared/spaces/**/*.{js,mjs,ts,tsx}', - 'x-pack/test/spaces_api_integration/**/*.{js,mjs,ts,tsx}', + 'x-pack/platform/test/spaces_api_integration/**/*.{js,mjs,ts,tsx}', ], rules: { '@typescript-eslint/consistent-type-imports': 1, diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a90e956041345..bf5e8a79ab860 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -968,7 +968,7 @@ src/platform/packages/private/kbn-some-dev-log @elastic/kibana-operations packages/kbn-sort-package-json @elastic/kibana-operations src/platform/packages/shared/kbn-sort-predicates @elastic/kibana-visualizations x-pack/platform/plugins/shared/spaces @elastic/kibana-security -x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin @elastic/kibana-security +x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin @elastic/kibana-security src/platform/packages/shared/kbn-spaces-utils @elastic/kibana-security packages/kbn-spec-to-console @elastic/kibana-management src/platform/packages/shared/kbn-sse-utils @elastic/obs-knowledge-team @@ -1988,7 +1988,7 @@ x-pack/platform/plugins/private/cloud_integrations/cloud_full_story/server/confi /x-pack/platform/test/functional/apps/spaces/ @elastic/kibana-security /x-pack/test/security_api_integration/ @elastic/kibana-security /x-pack/test/security_functional/ @elastic/kibana-security -/x-pack/test/spaces_api_integration/ @elastic/kibana-security +/x-pack/platform/test/spaces_api_integration/ @elastic/kibana-security /x-pack/platform/test/saved_object_api_integration/ @elastic/kibana-security /x-pack/test_serverless/**/test_suites/common/platform_security/ @elastic/kibana-security /x-pack/test_serverless/**/test_suites/search/platform_security/ @elastic/kibana-security diff --git a/package.json b/package.json index 25adcbc32b8d1..19e1aa927cf8f 100644 --- a/package.json +++ b/package.json @@ -953,7 +953,7 @@ "@kbn/snapshot-restore-plugin": "link:x-pack/platform/plugins/private/snapshot_restore", "@kbn/sort-predicates": "link:src/platform/packages/shared/kbn-sort-predicates", "@kbn/spaces-plugin": "link:x-pack/platform/plugins/shared/spaces", - "@kbn/spaces-test-plugin": "link:x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin", + "@kbn/spaces-test-plugin": "link:x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin", "@kbn/spaces-utils": "link:src/platform/packages/shared/kbn-spaces-utils", "@kbn/sse-utils": "link:src/platform/packages/shared/kbn-sse-utils", "@kbn/sse-utils-client": "link:src/platform/packages/shared/kbn-sse-utils-client", diff --git a/scripts/archive_migration_functions.sh b/scripts/archive_migration_functions.sh index 34f797d20dd6f..4c8b34c210d0f 100755 --- a/scripts/archive_migration_functions.sh +++ b/scripts/archive_migration_functions.sh @@ -379,7 +379,7 @@ save_kbn() { set -x node scripts/kbn_archiver.js --config "$test_config" save "$new_archive" --type $standard_list --space "$space" set +x - # node scripts/kbn_archiver.js --config x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts save x-pack/test/functional/fixtures/kbn_archiver/saved_objects/default_space --type search,index-pattern,visualization,dashboard,lens,map,graph-workspace,query,tag,url,canvas-workpad + # node scripts/kbn_archiver.js --config x-pack/platform/test/spaces_api_integration/security_and_spaces/config_basic.ts save x-pack/test/functional/fixtures/kbn_archiver/saved_objects/default_space --type search,index-pattern,visualization,dashboard,lens,map,graph-workspace,query,tag,url,canvas-workpad } load_kbn() { diff --git a/tsconfig.base.json b/tsconfig.base.json index aabbc9be99576..0f1e5e1a01edb 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1930,8 +1930,8 @@ "@kbn/sort-predicates/*": ["src/platform/packages/shared/kbn-sort-predicates/*"], "@kbn/spaces-plugin": ["x-pack/platform/plugins/shared/spaces"], "@kbn/spaces-plugin/*": ["x-pack/platform/plugins/shared/spaces/*"], - "@kbn/spaces-test-plugin": ["x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin"], - "@kbn/spaces-test-plugin/*": ["x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin/*"], + "@kbn/spaces-test-plugin": ["x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin"], + "@kbn/spaces-test-plugin/*": ["x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin/*"], "@kbn/spaces-utils": ["src/platform/packages/shared/kbn-spaces-utils"], "@kbn/spaces-utils/*": ["src/platform/packages/shared/kbn-spaces-utils/*"], "@kbn/spec-to-console": ["packages/kbn-spec-to-console"], diff --git a/x-pack/test/spaces_api_integration/common/config.ts b/x-pack/platform/test/spaces_api_integration/common/config.ts similarity index 100% rename from x-pack/test/spaces_api_integration/common/config.ts rename to x-pack/platform/test/spaces_api_integration/common/config.ts diff --git a/x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces/data.json b/x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces/data.json similarity index 100% rename from x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces/data.json rename to x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces/data.json diff --git a/x-pack/test/spaces_api_integration/common/fixtures/kbn_archiver/default_space.json b/x-pack/platform/test/spaces_api_integration/common/fixtures/kbn_archiver/default_space.json similarity index 100% rename from x-pack/test/spaces_api_integration/common/fixtures/kbn_archiver/default_space.json rename to x-pack/platform/test/spaces_api_integration/common/fixtures/kbn_archiver/default_space.json diff --git a/x-pack/test/spaces_api_integration/common/fixtures/kbn_archiver/space_1.json b/x-pack/platform/test/spaces_api_integration/common/fixtures/kbn_archiver/space_1.json similarity index 100% rename from x-pack/test/spaces_api_integration/common/fixtures/kbn_archiver/space_1.json rename to x-pack/platform/test/spaces_api_integration/common/fixtures/kbn_archiver/space_1.json diff --git a/x-pack/test/spaces_api_integration/common/fixtures/kbn_archiver/space_2.json b/x-pack/platform/test/spaces_api_integration/common/fixtures/kbn_archiver/space_2.json similarity index 100% rename from x-pack/test/spaces_api_integration/common/fixtures/kbn_archiver/space_2.json rename to x-pack/platform/test/spaces_api_integration/common/fixtures/kbn_archiver/space_2.json diff --git a/x-pack/test/spaces_api_integration/common/ftr_provider_context.d.ts b/x-pack/platform/test/spaces_api_integration/common/ftr_provider_context.d.ts similarity index 100% rename from x-pack/test/spaces_api_integration/common/ftr_provider_context.d.ts rename to x-pack/platform/test/spaces_api_integration/common/ftr_provider_context.d.ts diff --git a/x-pack/test/spaces_api_integration/common/lib/authentication.ts b/x-pack/platform/test/spaces_api_integration/common/lib/authentication.ts similarity index 100% rename from x-pack/test/spaces_api_integration/common/lib/authentication.ts rename to x-pack/platform/test/spaces_api_integration/common/lib/authentication.ts diff --git a/x-pack/test/spaces_api_integration/common/lib/create_users_and_roles.ts b/x-pack/platform/test/spaces_api_integration/common/lib/create_users_and_roles.ts similarity index 100% rename from x-pack/test/spaces_api_integration/common/lib/create_users_and_roles.ts rename to x-pack/platform/test/spaces_api_integration/common/lib/create_users_and_roles.ts diff --git a/x-pack/test/spaces_api_integration/common/lib/saved_object_test_cases.ts b/x-pack/platform/test/spaces_api_integration/common/lib/saved_object_test_cases.ts similarity index 100% rename from x-pack/test/spaces_api_integration/common/lib/saved_object_test_cases.ts rename to x-pack/platform/test/spaces_api_integration/common/lib/saved_object_test_cases.ts diff --git a/x-pack/test/spaces_api_integration/common/lib/space_test_utils.ts b/x-pack/platform/test/spaces_api_integration/common/lib/space_test_utils.ts similarity index 100% rename from x-pack/test/spaces_api_integration/common/lib/space_test_utils.ts rename to x-pack/platform/test/spaces_api_integration/common/lib/space_test_utils.ts diff --git a/x-pack/test/spaces_api_integration/common/lib/spaces.ts b/x-pack/platform/test/spaces_api_integration/common/lib/spaces.ts similarity index 100% rename from x-pack/test/spaces_api_integration/common/lib/spaces.ts rename to x-pack/platform/test/spaces_api_integration/common/lib/spaces.ts diff --git a/x-pack/test/spaces_api_integration/common/lib/types.ts b/x-pack/platform/test/spaces_api_integration/common/lib/types.ts similarity index 100% rename from x-pack/test/spaces_api_integration/common/lib/types.ts rename to x-pack/platform/test/spaces_api_integration/common/lib/types.ts diff --git a/x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin/kibana.jsonc b/x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin/kibana.jsonc similarity index 100% rename from x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin/kibana.jsonc rename to x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin/kibana.jsonc diff --git a/x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin/server/index.ts b/x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin/server/index.ts similarity index 100% rename from x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin/server/index.ts rename to x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin/server/index.ts diff --git a/x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin/server/plugin.ts b/x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin/server/plugin.ts similarity index 100% rename from x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin/server/plugin.ts rename to x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin/server/plugin.ts diff --git a/x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin/tsconfig.json b/x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin/tsconfig.json similarity index 81% rename from x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin/tsconfig.json rename to x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin/tsconfig.json index 201ae6ddf08eb..34d55f55ded60 100644 --- a/x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin/tsconfig.json +++ b/x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../../../../tsconfig.base.json", + "extends": "../../../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "isolatedModules": true diff --git a/x-pack/test/spaces_api_integration/common/services.ts b/x-pack/platform/test/spaces_api_integration/common/services.ts similarity index 73% rename from x-pack/test/spaces_api_integration/common/services.ts rename to x-pack/platform/test/spaces_api_integration/common/services.ts index 44ca7ec39c582..a7119607bc4ae 100644 --- a/x-pack/test/spaces_api_integration/common/services.ts +++ b/x-pack/platform/test/spaces_api_integration/common/services.ts @@ -6,9 +6,7 @@ */ import { services as apiIntegrationServices } from '../../api_integration/services'; -import { services as commonServices } from '../../common/services'; export const services = { - ...commonServices, - usageAPI: apiIntegrationServices.usageAPI, + ...apiIntegrationServices, }; diff --git a/x-pack/test/spaces_api_integration/common/suites/copy_to_space.ts b/x-pack/platform/test/spaces_api_integration/common/suites/copy_to_space.ts similarity index 99% rename from x-pack/test/spaces_api_integration/common/suites/copy_to_space.ts rename to x-pack/platform/test/spaces_api_integration/common/suites/copy_to_space.ts index 68e1ea401cbf3..5f2d25770afe2 100644 --- a/x-pack/test/spaces_api_integration/common/suites/copy_to_space.ts +++ b/x-pack/platform/test/spaces_api_integration/common/suites/copy_to_space.ts @@ -80,15 +80,18 @@ const UUID_PATTERN = new RegExp( const SPACE_DATA_TO_LOAD: Array<{ spaceName: string | null; dataUrl: string }> = [ { spaceName: null, - dataUrl: 'x-pack/test/spaces_api_integration/common/fixtures/kbn_archiver/default_space.json', + dataUrl: + 'x-pack/platform/test/spaces_api_integration/common/fixtures/kbn_archiver/default_space.json', }, { spaceName: SPACE_1.id, - dataUrl: 'x-pack/test/spaces_api_integration/common/fixtures/kbn_archiver/space_1.json', + dataUrl: + 'x-pack/platform/test/spaces_api_integration/common/fixtures/kbn_archiver/space_1.json', }, { spaceName: SPACE_2.id, - dataUrl: 'x-pack/test/spaces_api_integration/common/fixtures/kbn_archiver/space_2.json', + dataUrl: + 'x-pack/platform/test/spaces_api_integration/common/fixtures/kbn_archiver/space_2.json', }, ]; diff --git a/x-pack/test/spaces_api_integration/common/suites/create.ts b/x-pack/platform/test/spaces_api_integration/common/suites/create.ts similarity index 96% rename from x-pack/test/spaces_api_integration/common/suites/create.ts rename to x-pack/platform/test/spaces_api_integration/common/suites/create.ts index 59ff01aa1389a..2b00b7d2c9368 100644 --- a/x-pack/test/spaces_api_integration/common/suites/create.ts +++ b/x-pack/platform/test/spaces_api_integration/common/suites/create.ts @@ -108,12 +108,12 @@ export function createTestSuiteFactory(esArchiver: any, supertest: SuperTest { beforeEach(() => esArchiver.load( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); afterEach(() => esArchiver.unload( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); diff --git a/x-pack/test/spaces_api_integration/common/suites/delete.ts b/x-pack/platform/test/spaces_api_integration/common/suites/delete.ts similarity index 97% rename from x-pack/test/spaces_api_integration/common/suites/delete.ts rename to x-pack/platform/test/spaces_api_integration/common/suites/delete.ts index 1a75bc219ae1f..7f9a5e4442f20 100644 --- a/x-pack/test/spaces_api_integration/common/suites/delete.ts +++ b/x-pack/platform/test/spaces_api_integration/common/suites/delete.ts @@ -153,12 +153,12 @@ export function deleteTestSuiteFactory(es: Client, esArchiver: any, supertest: S describeFn(description, () => { beforeEach(async () => { await esArchiver.load( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ); }); afterEach(() => esArchiver.unload( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); diff --git a/x-pack/test/spaces_api_integration/common/suites/disable_legacy_url_aliases.ts b/x-pack/platform/test/spaces_api_integration/common/suites/disable_legacy_url_aliases.ts similarity index 91% rename from x-pack/test/spaces_api_integration/common/suites/disable_legacy_url_aliases.ts rename to x-pack/platform/test/spaces_api_integration/common/suites/disable_legacy_url_aliases.ts index c64c08660b2e4..e61a999a37811 100644 --- a/x-pack/test/spaces_api_integration/common/suites/disable_legacy_url_aliases.ts +++ b/x-pack/platform/test/spaces_api_integration/common/suites/disable_legacy_url_aliases.ts @@ -11,13 +11,13 @@ import type { Agent as SuperTestAgent } from 'supertest'; import type { LegacyUrlAlias } from '@kbn/core-saved-objects-base-server-internal'; import { MAIN_SAVED_OBJECT_INDEX } from '@kbn/core-saved-objects-server'; import expect from '@kbn/expect'; -import { getUrlPrefix } from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/saved_object_test_utils'; + +import { getUrlPrefix } from '../../../saved_object_api_integration/common/lib/saved_object_test_utils'; import type { ExpectResponseBody, TestDefinition, TestSuite, -} from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/types'; - +} from '../../../saved_object_api_integration/common/lib/types'; import { SPACES } from '../lib/spaces'; export interface DisableLegacyUrlAliasesTestDefinition extends TestDefinition { @@ -105,12 +105,12 @@ export function disableLegacyUrlAliasesTestSuiteFactory( describeFn(description, () => { before(() => esArchiver.load( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); after(() => esArchiver.unload( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); diff --git a/x-pack/test/spaces_api_integration/common/suites/get.ts b/x-pack/platform/test/spaces_api_integration/common/suites/get.ts similarity index 95% rename from x-pack/test/spaces_api_integration/common/suites/get.ts rename to x-pack/platform/test/spaces_api_integration/common/suites/get.ts index e8cf3f859cb30..4d06ec4b39158 100644 --- a/x-pack/test/spaces_api_integration/common/suites/get.ts +++ b/x-pack/platform/test/spaces_api_integration/common/suites/get.ts @@ -119,12 +119,12 @@ export function getTestSuiteFactory(esArchiver: any, supertest: SuperAgent) describeFn(description, () => { before(() => esArchiver.load( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); after(() => esArchiver.unload( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); diff --git a/x-pack/test/spaces_api_integration/common/suites/get_all.ts b/x-pack/platform/test/spaces_api_integration/common/suites/get_all.ts similarity index 96% rename from x-pack/test/spaces_api_integration/common/suites/get_all.ts rename to x-pack/platform/test/spaces_api_integration/common/suites/get_all.ts index df54e7c4bca46..991196b19d452 100644 --- a/x-pack/test/spaces_api_integration/common/suites/get_all.ts +++ b/x-pack/platform/test/spaces_api_integration/common/suites/get_all.ts @@ -140,12 +140,12 @@ export function getAllTestSuiteFactory(esArchiver: any, supertest: SuperTest { before(() => esArchiver.load( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); after(() => esArchiver.unload( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); diff --git a/x-pack/test/spaces_api_integration/common/suites/get_shareable_references.ts b/x-pack/platform/test/spaces_api_integration/common/suites/get_shareable_references.ts similarity index 96% rename from x-pack/test/spaces_api_integration/common/suites/get_shareable_references.ts rename to x-pack/platform/test/spaces_api_integration/common/suites/get_shareable_references.ts index 203f485ba2135..43c50f9442c31 100644 --- a/x-pack/test/spaces_api_integration/common/suites/get_shareable_references.ts +++ b/x-pack/platform/test/spaces_api_integration/common/suites/get_shareable_references.ts @@ -13,16 +13,16 @@ import type { } from '@kbn/core/server'; import expect from '@kbn/expect'; import { deepFreeze } from '@kbn/std'; + import { expectResponses, getUrlPrefix, -} from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/saved_object_test_utils'; +} from '../../../saved_object_api_integration/common/lib/saved_object_test_utils'; import type { ExpectResponseBody, TestDefinition, TestSuite, -} from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/types'; - +} from '../../../saved_object_api_integration/common/lib/types'; import { MULTI_NAMESPACE_SAVED_OBJECT_TEST_CASES as CASES } from '../lib/saved_object_test_cases'; import { SPACES } from '../lib/spaces'; @@ -262,12 +262,12 @@ export function getShareableReferencesTestSuiteFactory(esArchiver: any, supertes describeFn(description, () => { before(() => esArchiver.load( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); after(() => esArchiver.unload( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); diff --git a/x-pack/test/spaces_api_integration/common/suites/resolve_copy_to_space_conflicts.ts b/x-pack/platform/test/spaces_api_integration/common/suites/resolve_copy_to_space_conflicts.ts similarity index 98% rename from x-pack/test/spaces_api_integration/common/suites/resolve_copy_to_space_conflicts.ts rename to x-pack/platform/test/spaces_api_integration/common/suites/resolve_copy_to_space_conflicts.ts index 845d41d1431b9..b421bf210282e 100644 --- a/x-pack/test/spaces_api_integration/common/suites/resolve_copy_to_space_conflicts.ts +++ b/x-pack/platform/test/spaces_api_integration/common/suites/resolve_copy_to_space_conflicts.ts @@ -50,15 +50,18 @@ const NON_EXISTENT_SPACE_ID = 'non_existent_space'; const SPACE_DATA_TO_LOAD: Array<{ spaceName: string | null; dataUrl: string }> = [ { spaceName: null, - dataUrl: 'x-pack/test/spaces_api_integration/common/fixtures/kbn_archiver/default_space.json', + dataUrl: + 'x-pack/platform/test/spaces_api_integration/common/fixtures/kbn_archiver/default_space.json', }, { spaceName: SPACE_1.id, - dataUrl: 'x-pack/test/spaces_api_integration/common/fixtures/kbn_archiver/space_1.json', + dataUrl: + 'x-pack/platform/test/spaces_api_integration/common/fixtures/kbn_archiver/space_1.json', }, { spaceName: SPACE_2.id, - dataUrl: 'x-pack/test/spaces_api_integration/common/fixtures/kbn_archiver/space_2.json', + dataUrl: + 'x-pack/platform/test/spaces_api_integration/common/fixtures/kbn_archiver/space_2.json', }, ]; diff --git a/x-pack/test/spaces_api_integration/common/suites/update.ts b/x-pack/platform/test/spaces_api_integration/common/suites/update.ts similarity index 95% rename from x-pack/test/spaces_api_integration/common/suites/update.ts rename to x-pack/platform/test/spaces_api_integration/common/suites/update.ts index 62226bf4dbb8d..8e37ff5878cee 100644 --- a/x-pack/test/spaces_api_integration/common/suites/update.ts +++ b/x-pack/platform/test/spaces_api_integration/common/suites/update.ts @@ -73,12 +73,12 @@ export function updateTestSuiteFactory(esArchiver: any, supertest: SuperTest { before(() => esArchiver.load( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); after(() => esArchiver.unload( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); diff --git a/x-pack/test/spaces_api_integration/common/suites/update_objects_spaces.ts b/x-pack/platform/test/spaces_api_integration/common/suites/update_objects_spaces.ts similarity index 94% rename from x-pack/test/spaces_api_integration/common/suites/update_objects_spaces.ts rename to x-pack/platform/test/spaces_api_integration/common/suites/update_objects_spaces.ts index 76c31185d2e84..89c85dc2af64c 100644 --- a/x-pack/test/spaces_api_integration/common/suites/update_objects_spaces.ts +++ b/x-pack/platform/test/spaces_api_integration/common/suites/update_objects_spaces.ts @@ -14,16 +14,16 @@ import type { SavedObjectsUpdateObjectsSpacesResponse } from '@kbn/core/server'; import { SavedObjectsErrorHelpers } from '@kbn/core/server'; import { ALL_SAVED_OBJECT_INDICES } from '@kbn/core-saved-objects-server'; import expect from '@kbn/expect'; + import { expectResponses, getUrlPrefix, -} from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/saved_object_test_utils'; +} from '../../../saved_object_api_integration/common/lib/saved_object_test_utils'; import type { ExpectResponseBody, TestDefinition, TestSuite, -} from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/types'; - +} from '../../../saved_object_api_integration/common/lib/types'; import { SPACES } from '../lib/spaces'; export interface UpdateObjectsSpacesTestDefinition extends TestDefinition { @@ -148,12 +148,12 @@ export function updateObjectsSpacesTestSuiteFactory( describeFn(description, () => { before(() => esArchiver.load( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); after(() => esArchiver.unload( - 'x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' + 'x-pack/platform/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces' ) ); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/copy_to_space/copy_to_space.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/copy_to_space/copy_to_space.ts similarity index 99% rename from x-pack/test/spaces_api_integration/security_and_spaces/apis/copy_to_space/copy_to_space.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/copy_to_space/copy_to_space.ts index b7e10cb500e80..10480f72df6b0 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/copy_to_space/copy_to_space.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/copy_to_space/copy_to_space.ts @@ -10,7 +10,6 @@ import { AUTHENTICATION } from '../../../common/lib/authentication'; import { SPACES } from '../../../common/lib/spaces'; import { copyToSpaceTestSuiteFactory } from '../../../common/suites/copy_to_space'; -// eslint-disable-next-line import/no-default-export export default function copyToSpaceSpacesAndSecuritySuite(context: FtrProviderContext) { const { copyToSpaceTest, diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/copy_to_space/index.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/copy_to_space/index.ts similarity index 93% rename from x-pack/test/spaces_api_integration/security_and_spaces/apis/copy_to_space/index.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/copy_to_space/index.ts index 79a6e69cb6f32..876eedce0087d 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/copy_to_space/index.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/copy_to_space/index.ts @@ -8,7 +8,6 @@ import type { FtrProviderContext } from '../../../common/ftr_provider_context'; import { createUsersAndRoles } from '../../../common/lib/create_users_and_roles'; -// eslint-disable-next-line import/no-default-export export default function ({ loadTestFile, getService }: FtrProviderContext) { const es = getService('es'); const supertest = getService('supertest'); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/create.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/create.ts similarity index 99% rename from x-pack/test/spaces_api_integration/security_and_spaces/apis/create.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/create.ts index 6e5bc1649cb3f..e5227bc06d16f 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/create.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/create.ts @@ -12,7 +12,6 @@ import { AUTHENTICATION } from '../../common/lib/authentication'; import { SPACES } from '../../common/lib/spaces'; import { createTestSuiteFactory } from '../../common/suites/create'; -// eslint-disable-next-line import/no-default-export export default function createSpacesOnlySuite({ getService }: FtrProviderContext) { const supertestWithoutAuth = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/delete.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/delete.ts similarity index 99% rename from x-pack/test/spaces_api_integration/security_and_spaces/apis/delete.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/delete.ts index 01fd306a7f558..e78632cbba5da 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/delete.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/delete.ts @@ -12,7 +12,6 @@ import { AUTHENTICATION } from '../../common/lib/authentication'; import { SPACES } from '../../common/lib/spaces'; import { deleteTestSuiteFactory } from '../../common/suites/delete'; -// eslint-disable-next-line import/no-default-export export default function deleteSpaceTestSuite({ getService }: FtrProviderContext) { const supertestWithoutAuth = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/disable_legacy_url_aliases.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/disable_legacy_url_aliases.ts similarity index 91% rename from x-pack/test/spaces_api_integration/security_and_spaces/apis/disable_legacy_url_aliases.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/disable_legacy_url_aliases.ts index 86a5bca94f133..d8742be692c7b 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/disable_legacy_url_aliases.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/disable_legacy_url_aliases.ts @@ -5,9 +5,8 @@ * 2.0. */ -import { getTestScenarios } from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/saved_object_test_utils'; -import type { TestUser } from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/types'; - +import { getTestScenarios } from '../../../saved_object_api_integration/common/lib/saved_object_test_utils'; +import type { TestUser } from '../../../saved_object_api_integration/common/lib/types'; import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { SPACES } from '../../common/lib/spaces'; import type { DisableLegacyUrlAliasesTestDefinition } from '../../common/suites/disable_legacy_url_aliases'; @@ -32,7 +31,6 @@ const createTestCases = () => { }; }; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/get.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/get.ts similarity index 99% rename from x-pack/test/spaces_api_integration/security_and_spaces/apis/get.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/get.ts index cc24ffa0d891a..7d39651dc047c 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/get.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/get.ts @@ -12,7 +12,6 @@ import { AUTHENTICATION } from '../../common/lib/authentication'; import { SPACES } from '../../common/lib/spaces'; import { getTestSuiteFactory } from '../../common/suites/get'; -// eslint-disable-next-line import/no-default-export export default function getSpaceTestSuite({ getService }: FtrProviderContext) { const supertestWithoutAuth = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/get_all.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/get_all.ts similarity index 99% rename from x-pack/test/spaces_api_integration/security_and_spaces/apis/get_all.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/get_all.ts index 1c2db5f6bcd7c..34af1eb8f828a 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/get_all.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/get_all.ts @@ -12,7 +12,6 @@ import { AUTHENTICATION } from '../../common/lib/authentication'; import { SPACES } from '../../common/lib/spaces'; import { getAllTestSuiteFactory } from '../../common/suites/get_all'; -// eslint-disable-next-line import/no-default-export export default function getAllSpacesTestSuite({ getService }: FtrProviderContext) { const supertestWithoutAuth = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/get_shareable_references.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/get_shareable_references.ts similarity index 91% rename from x-pack/test/spaces_api_integration/security_and_spaces/apis/get_shareable_references.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/get_shareable_references.ts index 1c84d27ab77d3..ecf8feeabbe1f 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/get_shareable_references.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/get_shareable_references.ts @@ -5,9 +5,8 @@ * 2.0. */ -import { getTestScenarios } from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/saved_object_test_utils'; -import type { TestUser } from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/types'; - +import { getTestScenarios } from '../../../saved_object_api_integration/common/lib/saved_object_test_utils'; +import type { TestUser } from '../../../saved_object_api_integration/common/lib/types'; import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { SPACES } from '../../common/lib/spaces'; import type { @@ -44,7 +43,6 @@ const createTestCases = (spaceId: string): GetShareableReferencesTestCase[] => { throw new Error(`Unexpected test case for space '${spaceId}'!`); }; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/index.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/index.ts similarity index 96% rename from x-pack/test/spaces_api_integration/security_and_spaces/apis/index.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/index.ts index 756d47308f7fc..5148877c72fb8 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/index.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/index.ts @@ -8,7 +8,6 @@ import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { createUsersAndRoles } from '../../common/lib/create_users_and_roles'; -// eslint-disable-next-line import/no-default-export export default function ({ loadTestFile, getService }: FtrProviderContext) { const es = getService('es'); const supertest = getService('supertest'); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/resolve_copy_to_space_conflicts.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/resolve_copy_to_space_conflicts.ts similarity index 99% rename from x-pack/test/spaces_api_integration/security_and_spaces/apis/resolve_copy_to_space_conflicts.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/resolve_copy_to_space_conflicts.ts index da5054436dc69..2610a4b055bdd 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/resolve_copy_to_space_conflicts.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/resolve_copy_to_space_conflicts.ts @@ -10,7 +10,6 @@ import { AUTHENTICATION } from '../../common/lib/authentication'; import { SPACES } from '../../common/lib/spaces'; import { resolveCopyToSpaceConflictsSuite } from '../../common/suites/resolve_copy_to_space_conflicts'; -// eslint-disable-next-line import/no-default-export export default function resolveCopyToSpaceConflictsTestSuite(context: FtrProviderContext) { const { resolveCopyToSpaceConflictsTest, diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/update.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/update.ts similarity index 99% rename from x-pack/test/spaces_api_integration/security_and_spaces/apis/update.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/update.ts index 57fd1c5b1a202..58ae18c976c5b 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/update.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/update.ts @@ -12,7 +12,6 @@ import { AUTHENTICATION } from '../../common/lib/authentication'; import { SPACES } from '../../common/lib/spaces'; import { updateTestSuiteFactory } from '../../common/suites/update'; -// eslint-disable-next-line import/no-default-export export default function updateSpaceTestSuite({ getService }: FtrProviderContext) { const supertestWithoutAuth = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/update_objects_spaces.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/update_objects_spaces.ts similarity index 95% rename from x-pack/test/spaces_api_integration/security_and_spaces/apis/update_objects_spaces.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/update_objects_spaces.ts index d595e19e0d057..cb35d79554c84 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/update_objects_spaces.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/apis/update_objects_spaces.ts @@ -8,9 +8,8 @@ import { getTestScenarios, testCaseFailures, -} from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/saved_object_test_utils'; -import type { TestUser } from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/types'; - +} from '../../../saved_object_api_integration/common/lib/saved_object_test_utils'; +import type { TestUser } from '../../../saved_object_api_integration/common/lib/types'; import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { MULTI_NAMESPACE_SAVED_OBJECT_TEST_CASES as CASES } from '../../common/lib/saved_object_test_cases'; import { SPACES } from '../../common/lib/spaces'; @@ -124,7 +123,7 @@ const calculateSingleSpaceAuthZ = (testCases: UpdateObjectsSpacesTestCase[], spa } return { targetsThisSpace, targetsOtherSpace }; }; -// eslint-disable-next-line import/no-default-export + export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/config_basic.ts similarity index 87% rename from x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/config_basic.ts index 902f8baf026a8..f5e2caa4957fa 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/config_basic.ts @@ -7,5 +7,4 @@ import { createTestConfig } from '../common/config'; -// eslint-disable-next-line import/no-default-export export default createTestConfig('security_and_spaces', { license: 'basic' }); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/config_trial.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/config_trial.ts similarity index 87% rename from x-pack/test/spaces_api_integration/security_and_spaces/config_trial.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/config_trial.ts index 0481a6009d722..f30bd34797c7b 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/config_trial.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/config_trial.ts @@ -7,5 +7,4 @@ import { createTestConfig } from '../common/config'; -// eslint-disable-next-line import/no-default-export export default createTestConfig('security_and_spaces', { license: 'trial' }); diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_basic.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/copy_to_space_config_basic.ts similarity index 89% rename from x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_basic.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/copy_to_space_config_basic.ts index 609d747fa8861..a959abb57cca7 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_basic.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/copy_to_space_config_basic.ts @@ -7,7 +7,6 @@ import { createTestConfig } from '../common/config'; -// eslint-disable-next-line import/no-default-export export default createTestConfig('security_and_spaces', { license: 'basic', testFiles: [require.resolve('./apis/copy_to_space')], diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts b/x-pack/platform/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts similarity index 89% rename from x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts rename to x-pack/platform/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts index da8834134f258..ec509330a5cf4 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts +++ b/x-pack/platform/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts @@ -7,7 +7,6 @@ import { createTestConfig } from '../common/config'; -// eslint-disable-next-line import/no-default-export export default createTestConfig('security_and_spaces', { license: 'trial', testFiles: [require.resolve('./apis/copy_to_space')], diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/copy_to_space.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/copy_to_space.ts similarity index 97% rename from x-pack/test/spaces_api_integration/spaces_only/apis/copy_to_space.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/apis/copy_to_space.ts index 3867d528ef374..50a7ca334661d 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/apis/copy_to_space.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/copy_to_space.ts @@ -8,7 +8,6 @@ import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { copyToSpaceTestSuiteFactory } from '../../common/suites/copy_to_space'; -// eslint-disable-next-line import/no-default-export export default function copyToSpacesOnlySuite(context: FtrProviderContext) { const { copyToSpaceTest, diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/create.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/create.ts similarity index 97% rename from x-pack/test/spaces_api_integration/spaces_only/apis/create.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/apis/create.ts index c98754d60eec3..3a2ec14f18669 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/apis/create.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/create.ts @@ -11,7 +11,6 @@ import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { SPACES } from '../../common/lib/spaces'; import { createTestSuiteFactory } from '../../common/suites/create'; -// eslint-disable-next-line import/no-default-export export default function createSpacesOnlySuite({ getService }: FtrProviderContext) { const supertestWithoutAuth = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/delete.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/delete.ts similarity index 96% rename from x-pack/test/spaces_api_integration/spaces_only/apis/delete.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/apis/delete.ts index da50b9c37f190..89d7bfedb5d23 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/apis/delete.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/delete.ts @@ -11,7 +11,6 @@ import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { SPACES } from '../../common/lib/spaces'; import { deleteTestSuiteFactory } from '../../common/suites/delete'; -// eslint-disable-next-line import/no-default-export export default function deleteSpaceTestSuite({ getService }: FtrProviderContext) { const supertestWithoutAuth = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/disable_legacy_url_aliases.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/disable_legacy_url_aliases.ts similarity index 97% rename from x-pack/test/spaces_api_integration/spaces_only/apis/disable_legacy_url_aliases.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/apis/disable_legacy_url_aliases.ts index 1818beef05118..50ce17f822dd3 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/apis/disable_legacy_url_aliases.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/disable_legacy_url_aliases.ts @@ -29,7 +29,6 @@ const createTestCases = (): DisableLegacyUrlAliasesTestCase[] => { ]; }; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/get.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/get.ts similarity index 97% rename from x-pack/test/spaces_api_integration/spaces_only/apis/get.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/apis/get.ts index 5cca880f2a7f4..f3067b8bbf495 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/apis/get.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/get.ts @@ -11,7 +11,6 @@ import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { SPACES } from '../../common/lib/spaces'; import { getTestSuiteFactory } from '../../common/suites/get'; -// eslint-disable-next-line import/no-default-export export default function getSpaceTestSuite({ getService }: FtrProviderContext) { const supertestWithoutAuth = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/get_all.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/get_all.ts similarity index 97% rename from x-pack/test/spaces_api_integration/spaces_only/apis/get_all.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/apis/get_all.ts index 4b52f25eecbea..e18a937ce6925 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/apis/get_all.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/get_all.ts @@ -11,7 +11,6 @@ import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { SPACES } from '../../common/lib/spaces'; import { getAllTestSuiteFactory } from '../../common/suites/get_all'; -// eslint-disable-next-line import/no-default-export export default function getAllSpacesTestSuite({ getService }: FtrProviderContext) { const supertestWithoutAuth = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/get_shareable_references.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/get_shareable_references.ts similarity index 91% rename from x-pack/test/spaces_api_integration/spaces_only/apis/get_shareable_references.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/apis/get_shareable_references.ts index 302caecfae0d6..87f537ac7f119 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/apis/get_shareable_references.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/get_shareable_references.ts @@ -5,8 +5,7 @@ * 2.0. */ -import { getTestScenarios } from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/saved_object_test_utils'; - +import { getTestScenarios } from '../../../saved_object_api_integration/common/lib/saved_object_test_utils'; import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { SPACES } from '../../common/lib/spaces'; import type { GetShareableReferencesTestCase } from '../../common/suites/get_shareable_references'; @@ -40,7 +39,6 @@ const createTestCases = (spaceId: string): GetShareableReferencesTestCase[] => { throw new Error(`Unexpected test case for space '${spaceId}'!`); }; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/index.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/index.ts similarity index 95% rename from x-pack/test/spaces_api_integration/spaces_only/apis/index.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/apis/index.ts index 433ce2c6c444c..615f5dddf9765 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/apis/index.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/index.ts @@ -7,7 +7,6 @@ import type { FtrProviderContext } from '../../common/ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function spacesOnlyTestSuite({ loadTestFile }: FtrProviderContext) { describe('spaces api without security', function () { this.tags('skipFIPS'); diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/resolve_copy_to_space_conflicts.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/resolve_copy_to_space_conflicts.ts similarity index 97% rename from x-pack/test/spaces_api_integration/spaces_only/apis/resolve_copy_to_space_conflicts.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/apis/resolve_copy_to_space_conflicts.ts index 9fc16ed64abb8..4a22ea4a51cf2 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/apis/resolve_copy_to_space_conflicts.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/resolve_copy_to_space_conflicts.ts @@ -8,7 +8,6 @@ import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { resolveCopyToSpaceConflictsSuite } from '../../common/suites/resolve_copy_to_space_conflicts'; -// eslint-disable-next-line import/no-default-export export default function resolveCopyToSpaceConflictsTestSuite(context: FtrProviderContext) { const { resolveCopyToSpaceConflictsTest, diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/update.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/update.ts similarity index 96% rename from x-pack/test/spaces_api_integration/spaces_only/apis/update.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/apis/update.ts index 4a4055896e546..10cbd7a719d70 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/apis/update.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/update.ts @@ -11,7 +11,6 @@ import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { SPACES } from '../../common/lib/spaces'; import { updateTestSuiteFactory } from '../../common/suites/update'; -// eslint-disable-next-line import/no-default-export export default function updateSpaceTestSuite({ getService }: FtrProviderContext) { const supertestWithoutAuth = getService('supertestWithoutAuth'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/update_objects_spaces.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/update_objects_spaces.ts similarity index 97% rename from x-pack/test/spaces_api_integration/spaces_only/apis/update_objects_spaces.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/apis/update_objects_spaces.ts index 77dbcdd4967a3..a987e781c360d 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/apis/update_objects_spaces.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/apis/update_objects_spaces.ts @@ -8,8 +8,7 @@ import { getTestScenarios, testCaseFailures, -} from '@kbn/test-suites-xpack-platform/saved_object_api_integration/common/lib/saved_object_test_utils'; - +} from '../../../saved_object_api_integration/common/lib/saved_object_test_utils'; import type { FtrProviderContext } from '../../common/ftr_provider_context'; import { MULTI_NAMESPACE_SAVED_OBJECT_TEST_CASES as CASES } from '../../common/lib/saved_object_test_cases'; import { SPACES } from '../../common/lib/spaces'; @@ -164,7 +163,6 @@ const createMultiPartTestCases = () => { return [...group1, ...group2, ...group3]; }; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/spaces_api_integration/spaces_only/config.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/config.ts similarity index 90% rename from x-pack/test/spaces_api_integration/spaces_only/config.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/config.ts index fa5d6310fd60f..f1843dc9681bc 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/config.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/config.ts @@ -7,7 +7,6 @@ import { createTestConfig } from '../common/config'; -// eslint-disable-next-line import/no-default-export export default createTestConfig('spaces_only', { disabledPlugins: ['security'], license: 'basic', diff --git a/x-pack/test/spaces_api_integration/spaces_only/telemetry/index.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/telemetry/index.ts similarity index 90% rename from x-pack/test/spaces_api_integration/spaces_only/telemetry/index.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/telemetry/index.ts index 3b7f3e3232b99..b3840e5511619 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/telemetry/index.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/telemetry/index.ts @@ -7,7 +7,6 @@ import type { FtrProviderContext } from '../../common/ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function spacesOnlyTestSuite({ loadTestFile }: FtrProviderContext) { describe('spaces telemetry data', function () { loadTestFile(require.resolve('./telemetry')); diff --git a/x-pack/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts b/x-pack/platform/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts similarity index 98% rename from x-pack/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts rename to x-pack/platform/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts index a0bfeb3b56360..edbc4837e2fe7 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts +++ b/x-pack/platform/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts @@ -9,7 +9,6 @@ import expect from '@kbn/expect'; import type { FtrProviderContext } from '../../common/ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const spacesService = getService('spaces'); const usageAPI = getService('usageAPI'); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/management/multiple_spaces_enabled.ts b/x-pack/test_serverless/api_integration/test_suites/common/management/multiple_spaces_enabled.ts index c01ff76f9774c..ca22318dee809 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/management/multiple_spaces_enabled.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/management/multiple_spaces_enabled.ts @@ -17,7 +17,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; // kbnServerArgs: ['--xpack.spaces.maxSpaces=100'], // // Initial test coverage limited to CRUD operations and ensuring disabling features/toggling feature visibility is not possible. -// Full coverage of x-pack/test/api_integration/apis/spaces & x-pack/test/spaces_api_integration +// Full coverage of x-pack/test/api_integration/apis/spaces & x-pack/platform/test/spaces_api_integration // should be converted into a deployment agnostic suite when spaces are // permanently enabled in serverless. // diff --git a/yarn.lock b/yarn.lock index 48d41c2cda26b..b1be2bbd05482 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7551,7 +7551,7 @@ version "0.0.0" uid "" -"@kbn/spaces-test-plugin@link:x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin": +"@kbn/spaces-test-plugin@link:x-pack/platform/test/spaces_api_integration/common/plugins/spaces_test_plugin": version "0.0.0" uid ""