From c99e4386145336a896615ec90141df9ce6f4f8f0 Mon Sep 17 00:00:00 2001 From: Joe Portner <5295965+jportner@users.noreply.github.com> Date: Thu, 6 May 2021 11:35:08 -0400 Subject: [PATCH] Add integration test for _get_shareable_references --- .../saved_objects/spaces/data.json | 3 + .../saved_objects/spaces/data.json | 51 ++++ .../common/suites/get_shareable_references.ts | 270 ++++++++++++++++++ .../apis/get_shareable_references.ts | 86 ++++++ .../security_and_spaces/apis/index.ts | 1 + .../apis/get_shareable_references.ts | 62 ++++ .../spaces_only/apis/index.ts | 1 + 7 files changed, 474 insertions(+) create mode 100644 x-pack/test/spaces_api_integration/common/suites/get_shareable_references.ts create mode 100644 x-pack/test/spaces_api_integration/security_and_spaces/apis/get_shareable_references.ts create mode 100644 x-pack/test/spaces_api_integration/spaces_only/apis/get_shareable_references.ts diff --git a/x-pack/test/saved_object_api_integration/common/fixtures/es_archiver/saved_objects/spaces/data.json b/x-pack/test/saved_object_api_integration/common/fixtures/es_archiver/saved_objects/spaces/data.json index 5fac012d5e8b9..d83c550c15ff6 100644 --- a/x-pack/test/saved_object_api_integration/common/fixtures/es_archiver/saved_objects/spaces/data.json +++ b/x-pack/test/saved_object_api_integration/common/fixtures/es_archiver/saved_objects/spaces/data.json @@ -544,6 +544,7 @@ "type": "legacy-url-alias", "updated_at": "2017-09-21T18:51:23.794Z", "legacy-url-alias": { + "sourceId": "alias-match", "targetNamespace": "space_1", "targetType": "resolvetype", "targetId": "alias-match-newid" @@ -561,6 +562,7 @@ "type": "legacy-url-alias", "updated_at": "2017-09-21T18:51:23.794Z", "legacy-url-alias": { + "sourceId": "disabled", "targetNamespace": "space_1", "targetType": "resolvetype", "targetId": "alias-match-newid", @@ -611,6 +613,7 @@ "type": "legacy-url-alias", "updated_at": "2017-09-21T18:51:23.794Z", "legacy-url-alias": { + "sourceId": "conflict", "targetNamespace": "space_1", "targetType": "resolvetype", "targetId": "conflict-newid" diff --git a/x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces/data.json b/x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces/data.json index 5ce6c0ce6b7c5..d1860a905f56c 100644 --- a/x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces/data.json +++ b/x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces/data.json @@ -388,6 +388,9 @@ }, "type": "sharedtype", "namespaces": ["default"], + "references": [ + { "type": "sharedtype", "id": "each_space", "name": "refname" } + ], "updated_at": "2017-09-21T18:59:16.270Z" }, "type": "doc" @@ -405,12 +408,33 @@ }, "type": "sharedtype", "namespaces": ["space_1"], + "references": [ + { "type": "sharedtype", "id": "each_space", "name": "refname" } + ], "updated_at": "2017-09-21T18:59:16.270Z" }, "type": "doc" } } +{ + "type": "doc", + "value": { + "id": "legacy-url-alias:space_1:sharedtype:default_only", + "index": ".kibana", + "source": { + "type": "legacy-url-alias", + "updated_at": "2017-09-21T18:51:23.794Z", + "legacy-url-alias": { + "sourceId": "default_only", + "targetNamespace": "space_1", + "targetType": "sharedtype", + "targetId": "space_1_only" + } + } + } +} + { "type": "doc", "value": { @@ -422,12 +446,33 @@ }, "type": "sharedtype", "namespaces": ["space_2"], + "references": [ + { "type": "sharedtype", "id": "each_space", "name": "refname" } + ], "updated_at": "2017-09-21T18:59:16.270Z" }, "type": "doc" } } +{ + "type": "doc", + "value": { + "id": "legacy-url-alias:space_2:sharedtype:default_only", + "index": ".kibana", + "source": { + "type": "legacy-url-alias", + "updated_at": "2017-09-21T18:51:23.794Z", + "legacy-url-alias": { + "sourceId": "default_only", + "targetNamespace": "space_2", + "targetType": "sharedtype", + "targetId": "space_2_only" + } + } + } +} + { "type": "doc", "value": { @@ -490,6 +535,12 @@ }, "type": "sharedtype", "namespaces": ["default", "space_1", "space_2"], + "references": [ + { "type": "sharedtype", "id": "default_only", "name": "refname" }, + { "type": "sharedtype", "id": "space_1_only", "name": "refname" }, + { "type": "sharedtype", "id": "space_2_only", "name": "refname" }, + { "type": "sharedtype", "id": "all_spaces", "name": "refname" } + ], "updated_at": "2017-09-21T18:59:16.270Z" }, "type": "doc" diff --git a/x-pack/test/spaces_api_integration/common/suites/get_shareable_references.ts b/x-pack/test/spaces_api_integration/common/suites/get_shareable_references.ts new file mode 100644 index 0000000000000..a10e28d52924e --- /dev/null +++ b/x-pack/test/spaces_api_integration/common/suites/get_shareable_references.ts @@ -0,0 +1,270 @@ +/* + * 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 { deepFreeze } from '@kbn/std'; +import { SuperTest } from 'supertest'; +import { + SavedObjectsCollectMultiNamespaceReferencesResponse, + SavedObjectReferenceWithContext, +} from '../../../../../src/core/server'; +import { MULTI_NAMESPACE_SAVED_OBJECT_TEST_CASES as CASES } from '../lib/saved_object_test_cases'; +import { SPACES } from '../lib/spaces'; +import { + expectResponses, + getUrlPrefix, +} from '../../../saved_object_api_integration/common/lib/saved_object_test_utils'; +import { + ExpectResponseBody, + TestDefinition, + TestSuite, +} from '../../../saved_object_api_integration/common/lib/types'; + +export interface GetShareableReferencesTestDefinition extends TestDefinition { + request: { + objects: Array<{ type: string; id: string }>; + }; +} +export type GetShareableReferencesTestSuite = TestSuite; +export interface GetShareableReferencesTestCase { + objects: Array<{ type: string; id: string }>; + expectedResults: SavedObjectReferenceWithContext[]; +} + +const { + DEFAULT: { spaceId: DEFAULT_SPACE_ID }, + SPACE_1: { spaceId: SPACE_1_ID }, + SPACE_2: { spaceId: SPACE_2_ID }, +} = SPACES; +export const TEST_CASE_OBJECTS: Record = deepFreeze({ + SHAREABLE_TYPE: { type: 'sharedtype', id: CASES.EACH_SPACE.id }, // contains references to four other objects + SHAREABLE_TYPE_DOES_NOT_EXIST: { type: 'sharedtype', id: 'does-not-exist' }, + NON_SHAREABLE_TYPE: { type: 'dashboard', id: 'my_dashboard' }, // one of these exists in each space +}); +// Expected results for each space are defined here since they are used in multiple test suites +export const EXPECTED_RESULTS: Record = { + IN_DEFAULT_SPACE: [ + { + ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, + spaces: [DEFAULT_SPACE_ID, SPACE_1_ID, SPACE_2_ID], + inboundReferences: [{ type: 'sharedtype', id: CASES.DEFAULT_ONLY.id, name: 'refname' }], // only reflects inbound reference that exist in the default space + }, + { + ...TEST_CASE_OBJECTS.SHAREABLE_TYPE_DOES_NOT_EXIST, + spaces: [], + inboundReferences: [], + isMissing: true, // doesn't exist anywhere + }, + { ...TEST_CASE_OBJECTS.NON_SHAREABLE_TYPE, spaces: [], inboundReferences: [] }, // not missing, but has an empty spaces array because it is not a shareable type + { + type: 'sharedtype', + id: CASES.DEFAULT_ONLY.id, + spaces: [DEFAULT_SPACE_ID], + inboundReferences: [{ ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, name: 'refname' }], + spacesWithMatchingAliases: [SPACE_1_ID, SPACE_2_ID], // aliases with a matching targetType and sourceId exist in two other spaces + }, + { + type: 'sharedtype', + id: CASES.SPACE_1_ONLY.id, + spaces: [], + inboundReferences: [{ ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, name: 'refname' }], + isMissing: true, // doesn't exist in the default space + }, + { + type: 'sharedtype', + id: CASES.SPACE_2_ONLY.id, + spaces: [], + inboundReferences: [{ ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, name: 'refname' }], + isMissing: true, // doesn't exist in the default space + }, + { + type: 'sharedtype', + id: CASES.ALL_SPACES.id, + spaces: ['*'], + inboundReferences: [{ ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, name: 'refname' }], + }, + ], + IN_SPACE_1: [ + { + ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, + spaces: [DEFAULT_SPACE_ID, SPACE_1_ID, SPACE_2_ID], + inboundReferences: [{ type: 'sharedtype', id: CASES.SPACE_1_ONLY.id, name: 'refname' }], // only reflects inbound reference that exist in space 1 + }, + { + ...TEST_CASE_OBJECTS.SHAREABLE_TYPE_DOES_NOT_EXIST, + spaces: [], + inboundReferences: [], + isMissing: true, // doesn't exist anywhere + }, + { ...TEST_CASE_OBJECTS.NON_SHAREABLE_TYPE, spaces: [], inboundReferences: [] }, // not missing, but has an empty spaces array because it is not a shareable type + { + type: 'sharedtype', + id: CASES.DEFAULT_ONLY.id, + spaces: [], + inboundReferences: [{ ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, name: 'refname' }], + isMissing: true, // doesn't exist in space 1 + }, + { + type: 'sharedtype', + id: CASES.SPACE_1_ONLY.id, + spaces: [SPACE_1_ID], + inboundReferences: [{ ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, name: 'refname' }], + }, + { + type: 'sharedtype', + id: CASES.SPACE_2_ONLY.id, + spaces: [], + inboundReferences: [{ ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, name: 'refname' }], + isMissing: true, // doesn't exist in space 1 + }, + { + type: 'sharedtype', + id: CASES.ALL_SPACES.id, + spaces: ['*'], + inboundReferences: [{ ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, name: 'refname' }], + }, + ], + IN_SPACE_2: [ + { + ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, + spaces: [DEFAULT_SPACE_ID, SPACE_1_ID, SPACE_2_ID], + inboundReferences: [{ type: 'sharedtype', id: CASES.SPACE_2_ONLY.id, name: 'refname' }], // only reflects inbound reference that exist in space 2 + }, + { + ...TEST_CASE_OBJECTS.SHAREABLE_TYPE_DOES_NOT_EXIST, + spaces: [], + inboundReferences: [], + isMissing: true, // doesn't exist anywhere + }, + { ...TEST_CASE_OBJECTS.NON_SHAREABLE_TYPE, spaces: [], inboundReferences: [] }, // not missing, but has an empty spaces array because it is not a shareable type + { + type: 'sharedtype', + id: CASES.DEFAULT_ONLY.id, + spaces: [], + inboundReferences: [{ ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, name: 'refname' }], + isMissing: true, // doesn't exist in space 2 + }, + { + type: 'sharedtype', + id: CASES.SPACE_1_ONLY.id, + spaces: [], + inboundReferences: [{ ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, name: 'refname' }], + isMissing: true, // doesn't exist in space 2 + }, + { + type: 'sharedtype', + id: CASES.SPACE_2_ONLY.id, + spaces: [SPACE_2_ID], + inboundReferences: [{ ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, name: 'refname' }], + }, + { + type: 'sharedtype', + id: CASES.ALL_SPACES.id, + spaces: ['*'], + inboundReferences: [{ ...TEST_CASE_OBJECTS.SHAREABLE_TYPE, name: 'refname' }], + }, + ], +}; + +const createRequest = ({ objects }: GetShareableReferencesTestCase) => ({ objects }); +const getTestTitle = ({ objects }: GetShareableReferencesTestCase) => { + const objStr = objects.map(({ type, id }) => `${type}:${id}`).join(','); + return `{objects: [${objStr}]}`; +}; +const getRedactedSpaces = (authorizedSpace: string | undefined, spaces: string[]) => { + if (!authorizedSpace) { + return spaces; // if authorizedSpace is undefined, we should not redact any spaces + } + const redactedSpaces = spaces.map((x) => (x !== authorizedSpace && x !== '*' ? '?' : x)); + return redactedSpaces.sort((a, b) => (a === '?' ? 1 : b === '?' ? -1 : 0)); // unknown spaces are always at the end of the array +}; + +export function getShareableReferencesTestSuiteFactory(esArchiver: any, supertest: SuperTest) { + const expectForbidden = expectResponses.forbiddenTypes('share_to_space'); + const expectResponseBody = ( + testCase: GetShareableReferencesTestCase, + statusCode: 200 | 403, + authorizedSpace?: string + ): ExpectResponseBody => async (response: Record) => { + if (statusCode === 403) { + const types = testCase.objects.map((x) => x.type); + await expectForbidden(types)(response); + } else { + const { expectedResults } = testCase; + const apiResponse = response.body as SavedObjectsCollectMultiNamespaceReferencesResponse; + expect(apiResponse.objects).to.have.length(expectedResults.length); + expectedResults.forEach((expectedResult, i) => { + const { spaces, spacesWithMatchingAliases } = expectedResult; + const expectedSpaces = getRedactedSpaces(authorizedSpace, spaces); + const expectedSpacesWithMatchingAliases = + spacesWithMatchingAliases && + getRedactedSpaces(authorizedSpace, spacesWithMatchingAliases); + const expected = { + ...expectedResult, + spaces: expectedSpaces, + ...(expectedSpacesWithMatchingAliases && { + spacesWithMatchingAliases: expectedSpacesWithMatchingAliases, + }), + }; + expect(apiResponse.objects[i]).to.eql(expected); + }); + } + }; + const createTestDefinitions = ( + testCases: GetShareableReferencesTestCase | GetShareableReferencesTestCase[], + forbidden: boolean, + options: { + /** If defined, will expect results to have redacted any spaces that do not match this one. */ + authorizedSpace?: string; + responseBodyOverride?: ExpectResponseBody; + } = {} + ): GetShareableReferencesTestDefinition[] => { + const cases = Array.isArray(testCases) ? testCases : [testCases]; + const responseStatusCode = forbidden ? 403 : 200; + return cases.map((x) => ({ + title: getTestTitle(x), + responseStatusCode, + request: createRequest(x), + responseBody: + options?.responseBodyOverride || + expectResponseBody(x, responseStatusCode, options.authorizedSpace), + })); + }; + + const makeGetShareableReferencesTest = (describeFn: Mocha.SuiteFunction) => ( + description: string, + definition: GetShareableReferencesTestSuite + ) => { + const { user, spaceId = SPACES.DEFAULT.spaceId, tests } = definition; + + describeFn(description, () => { + before(() => esArchiver.load('saved_objects/spaces')); + after(() => esArchiver.unload('saved_objects/spaces')); + + for (const test of tests) { + it(`should return ${test.responseStatusCode} ${test.title}`, async () => { + const requestBody = test.request; + await supertest + .post(`${getUrlPrefix(spaceId)}/api/spaces/_get_shareable_references`) + .auth(user?.username, user?.password) + .send(requestBody) + .expect(test.responseStatusCode) + .then(test.responseBody); + }); + } + }); + }; + + const addTests = makeGetShareableReferencesTest(describe); + // @ts-ignore + addTests.only = makeGetShareableReferencesTest(describe.only); + + return { + addTests, + createTestDefinitions, + }; +} diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/get_shareable_references.ts b/x-pack/test/spaces_api_integration/security_and_spaces/apis/get_shareable_references.ts new file mode 100644 index 0000000000000..d3466dd511e82 --- /dev/null +++ b/x-pack/test/spaces_api_integration/security_and_spaces/apis/get_shareable_references.ts @@ -0,0 +1,86 @@ +/* + * 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 { SPACES } from '../../common/lib/spaces'; +import { getTestScenarios } from '../../../saved_object_api_integration/common/lib/saved_object_test_utils'; +import { TestUser } from '../../../saved_object_api_integration/common/lib/types'; +import { + getShareableReferencesTestSuiteFactory, + GetShareableReferencesTestCase, + GetShareableReferencesTestDefinition, + TEST_CASE_OBJECTS, + EXPECTED_RESULTS, +} from '../../common/suites/get_shareable_references'; +import { FtrProviderContext } from '../../common/ftr_provider_context'; + +const { + DEFAULT: { spaceId: DEFAULT_SPACE_ID }, + SPACE_1: { spaceId: SPACE_1_ID }, + SPACE_2: { spaceId: SPACE_2_ID }, +} = SPACES; + +const createTestCases = (spaceId: string): GetShareableReferencesTestCase[] => { + const objects = [ + // requested objects are the same for each space + TEST_CASE_OBJECTS.SHAREABLE_TYPE, + TEST_CASE_OBJECTS.SHAREABLE_TYPE_DOES_NOT_EXIST, + TEST_CASE_OBJECTS.NON_SHAREABLE_TYPE, + ]; + + if (spaceId === DEFAULT_SPACE_ID) { + return [{ objects, expectedResults: EXPECTED_RESULTS.IN_DEFAULT_SPACE }]; + } else if (spaceId === SPACE_1_ID) { + return [{ objects, expectedResults: EXPECTED_RESULTS.IN_SPACE_1 }]; + } else if (spaceId === SPACE_2_ID) { + return [{ objects, expectedResults: EXPECTED_RESULTS.IN_SPACE_2 }]; + } + 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'); + + const { addTests, createTestDefinitions } = getShareableReferencesTestSuiteFactory( + esArchiver, + supertest + ); + const createTests = (spaceId: string) => { + const testCases = createTestCases(spaceId); + return { + unauthorized: createTestDefinitions(testCases, true), + authorizedThisSpace: createTestDefinitions(testCases, false, { authorizedSpace: spaceId }), + authorizedGlobally: createTestDefinitions(testCases, false), + }; + }; + + describe('_get_shareable_references', () => { + getTestScenarios().securityAndSpaces.forEach(({ spaceId, users }) => { + const suffix = ` targeting the ${spaceId} space`; + const { unauthorized, authorizedThisSpace, authorizedGlobally } = createTests(spaceId); + const _addTests = (user: TestUser, tests: GetShareableReferencesTestDefinition[]) => { + addTests(`${user.description}${suffix}`, { user, spaceId, tests }); + }; + + [ + users.noAccess, + users.legacyAll, + users.dualRead, + users.readGlobally, + users.readAtSpace, + users.allAtOtherSpace, + ].forEach((user) => { + _addTests(user, unauthorized); + }); + _addTests(users.allAtSpace, authorizedThisSpace); + [users.dualAll, users.allGlobally, users.superuser].forEach((user) => { + _addTests(user, authorizedGlobally); + }); + }); + }); +} diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/index.ts b/x-pack/test/spaces_api_integration/security_and_spaces/apis/index.ts index e5fbd0cd54aa3..4bb4d10eaabf8 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/index.ts +++ b/x-pack/test/spaces_api_integration/security_and_spaces/apis/index.ts @@ -25,6 +25,7 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) { loadTestFile(require.resolve('./create')); loadTestFile(require.resolve('./delete')); loadTestFile(require.resolve('./get_all')); + loadTestFile(require.resolve('./get_shareable_references')); loadTestFile(require.resolve('./get')); loadTestFile(require.resolve('./update')); loadTestFile(require.resolve('./update_objects_spaces')); diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/get_shareable_references.ts b/x-pack/test/spaces_api_integration/spaces_only/apis/get_shareable_references.ts new file mode 100644 index 0000000000000..5eec1dda83e5a --- /dev/null +++ b/x-pack/test/spaces_api_integration/spaces_only/apis/get_shareable_references.ts @@ -0,0 +1,62 @@ +/* + * 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 { SPACES } from '../../common/lib/spaces'; +import { getTestScenarios } from '../../../saved_object_api_integration/common/lib/saved_object_test_utils'; +import { + getShareableReferencesTestSuiteFactory, + GetShareableReferencesTestCase, + TEST_CASE_OBJECTS, + EXPECTED_RESULTS, +} from '../../common/suites/get_shareable_references'; +import { FtrProviderContext } from '../../common/ftr_provider_context'; + +const { + DEFAULT: { spaceId: DEFAULT_SPACE_ID }, + SPACE_1: { spaceId: SPACE_1_ID }, + SPACE_2: { spaceId: SPACE_2_ID }, +} = SPACES; + +const createTestCases = (spaceId: string): GetShareableReferencesTestCase[] => { + const objects = [ + // requested objects are the same for each space + TEST_CASE_OBJECTS.SHAREABLE_TYPE, + TEST_CASE_OBJECTS.SHAREABLE_TYPE_DOES_NOT_EXIST, + TEST_CASE_OBJECTS.NON_SHAREABLE_TYPE, + ]; + + if (spaceId === DEFAULT_SPACE_ID) { + return [{ objects, expectedResults: EXPECTED_RESULTS.IN_DEFAULT_SPACE }]; + } else if (spaceId === SPACE_1_ID) { + return [{ objects, expectedResults: EXPECTED_RESULTS.IN_SPACE_1 }]; + } else if (spaceId === SPACE_2_ID) { + return [{ objects, expectedResults: EXPECTED_RESULTS.IN_SPACE_2 }]; + } + 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'); + + const { addTests, createTestDefinitions } = getShareableReferencesTestSuiteFactory( + esArchiver, + supertest + ); + const createTests = (spaceId: string) => { + const testCases = createTestCases(spaceId); + return createTestDefinitions(testCases, false); + }; + + describe('_get_shareable_references', () => { + getTestScenarios().spaces.forEach(({ spaceId }) => { + const tests = createTests(spaceId); + addTests(`targeting the ${spaceId} space`, { spaceId, tests }); + }); + }); +} diff --git a/x-pack/test/spaces_api_integration/spaces_only/apis/index.ts b/x-pack/test/spaces_api_integration/spaces_only/apis/index.ts index 17816a7e9a9e9..489e2c2d22ffa 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/apis/index.ts +++ b/x-pack/test/spaces_api_integration/spaces_only/apis/index.ts @@ -17,6 +17,7 @@ export default function spacesOnlyTestSuite({ loadTestFile }: FtrProviderContext loadTestFile(require.resolve('./create')); loadTestFile(require.resolve('./delete')); loadTestFile(require.resolve('./get_all')); + loadTestFile(require.resolve('./get_shareable_references')); loadTestFile(require.resolve('./get')); loadTestFile(require.resolve('./update')); loadTestFile(require.resolve('./update_objects_spaces'));