diff --git a/x-pack/test/rbac_api_integration/apis/es/has_privileges.js b/x-pack/test/api_integration/apis/es/has_privileges.js similarity index 100% rename from x-pack/test/rbac_api_integration/apis/es/has_privileges.js rename to x-pack/test/api_integration/apis/es/has_privileges.js diff --git a/x-pack/test/rbac_api_integration/apis/es/index.js b/x-pack/test/api_integration/apis/es/index.js similarity index 100% rename from x-pack/test/rbac_api_integration/apis/es/index.js rename to x-pack/test/api_integration/apis/es/index.js diff --git a/x-pack/test/rbac_api_integration/apis/es/post_privileges.js b/x-pack/test/api_integration/apis/es/post_privileges.js similarity index 100% rename from x-pack/test/rbac_api_integration/apis/es/post_privileges.js rename to x-pack/test/api_integration/apis/es/post_privileges.js diff --git a/x-pack/test/api_integration/apis/index.js b/x-pack/test/api_integration/apis/index.js index 7f105650141d9..85b11bb9ef71e 100644 --- a/x-pack/test/api_integration/apis/index.js +++ b/x-pack/test/api_integration/apis/index.js @@ -6,6 +6,7 @@ export default function ({ loadTestFile }) { describe('apis', () => { + loadTestFile(require.resolve('./es')); loadTestFile(require.resolve('./security')); loadTestFile(require.resolve('./monitoring')); loadTestFile(require.resolve('./xpack_main')); diff --git a/x-pack/test/rbac_api_integration/apis/index.js b/x-pack/test/rbac_api_integration/apis/index.js index f28f18b83c90d..5642b33982c99 100644 --- a/x-pack/test/rbac_api_integration/apis/index.js +++ b/x-pack/test/rbac_api_integration/apis/index.js @@ -180,8 +180,6 @@ export default function ({ loadTestFile, getService }) { }); }); - loadTestFile(require.resolve('./es')); - loadTestFile(require.resolve('./privileges')); loadTestFile(require.resolve('./saved_objects')); loadTestFile(require.resolve('./spaces')); }); diff --git a/x-pack/test/rbac_api_integration/apis/privileges/index.js b/x-pack/test/rbac_api_integration/apis/privileges/index.js deleted file mode 100644 index 60d674e48cd6b..0000000000000 --- a/x-pack/test/rbac_api_integration/apis/privileges/index.js +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ -import expect from 'expect.js'; - -export default function ({ getService }) { - describe('privileges', () => { - it(`get should return privileges`, async () => { - const supertest = getService('supertest'); - const kibanaServer = getService('kibanaServer'); - const version = await kibanaServer.version.get(); - - await supertest - .get(`/api/security/v1/privileges`) - .expect(200) - .then(resp => { - expect(resp.body).to.eql({ - global: { - all: [`version:${version}`, 'action:*'], - read: [ - `version:${version}`, - 'action:login', - 'action:saved_objects/config/get', - 'action:saved_objects/config/bulk_get', - 'action:saved_objects/config/find', - 'action:saved_objects/timelion-sheet/get', - 'action:saved_objects/timelion-sheet/bulk_get', - 'action:saved_objects/timelion-sheet/find', - 'action:saved_objects/graph-workspace/get', - 'action:saved_objects/graph-workspace/bulk_get', - 'action:saved_objects/graph-workspace/find', - 'action:saved_objects/index-pattern/get', - 'action:saved_objects/index-pattern/bulk_get', - 'action:saved_objects/index-pattern/find', - 'action:saved_objects/visualization/get', - 'action:saved_objects/visualization/bulk_get', - 'action:saved_objects/visualization/find', - 'action:saved_objects/search/get', - 'action:saved_objects/search/bulk_get', - 'action:saved_objects/search/find', - 'action:saved_objects/dashboard/get', - 'action:saved_objects/dashboard/bulk_get', - 'action:saved_objects/dashboard/find', - 'action:saved_objects/url/get', - 'action:saved_objects/url/bulk_get', - 'action:saved_objects/url/find', - 'action:saved_objects/server/get', - 'action:saved_objects/server/bulk_get', - 'action:saved_objects/server/find', - ], - }, - space: { - all: [ - `version:${version}`, - 'action:login', - 'action:saved_objects/config/create', - 'action:saved_objects/config/bulk_create', - 'action:saved_objects/config/delete', - 'action:saved_objects/config/get', - 'action:saved_objects/config/bulk_get', - 'action:saved_objects/config/find', - 'action:saved_objects/config/update', - 'action:saved_objects/timelion-sheet/create', - 'action:saved_objects/timelion-sheet/bulk_create', - 'action:saved_objects/timelion-sheet/delete', - 'action:saved_objects/timelion-sheet/get', - 'action:saved_objects/timelion-sheet/bulk_get', - 'action:saved_objects/timelion-sheet/find', - 'action:saved_objects/timelion-sheet/update', - 'action:saved_objects/graph-workspace/create', - 'action:saved_objects/graph-workspace/bulk_create', - 'action:saved_objects/graph-workspace/delete', - 'action:saved_objects/graph-workspace/get', - 'action:saved_objects/graph-workspace/bulk_get', - 'action:saved_objects/graph-workspace/find', - 'action:saved_objects/graph-workspace/update', - 'action:saved_objects/index-pattern/create', - 'action:saved_objects/index-pattern/bulk_create', - 'action:saved_objects/index-pattern/delete', - 'action:saved_objects/index-pattern/get', - 'action:saved_objects/index-pattern/bulk_get', - 'action:saved_objects/index-pattern/find', - 'action:saved_objects/index-pattern/update', - 'action:saved_objects/visualization/create', - 'action:saved_objects/visualization/bulk_create', - 'action:saved_objects/visualization/delete', - 'action:saved_objects/visualization/get', - 'action:saved_objects/visualization/bulk_get', - 'action:saved_objects/visualization/find', - 'action:saved_objects/visualization/update', - 'action:saved_objects/search/create', - 'action:saved_objects/search/bulk_create', - 'action:saved_objects/search/delete', - 'action:saved_objects/search/get', - 'action:saved_objects/search/bulk_get', - 'action:saved_objects/search/find', - 'action:saved_objects/search/update', - 'action:saved_objects/dashboard/create', - 'action:saved_objects/dashboard/bulk_create', - 'action:saved_objects/dashboard/delete', - 'action:saved_objects/dashboard/get', - 'action:saved_objects/dashboard/bulk_get', - 'action:saved_objects/dashboard/find', - 'action:saved_objects/dashboard/update', - 'action:saved_objects/url/create', - 'action:saved_objects/url/bulk_create', - 'action:saved_objects/url/delete', - 'action:saved_objects/url/get', - 'action:saved_objects/url/bulk_get', - 'action:saved_objects/url/find', - 'action:saved_objects/url/update', - 'action:saved_objects/server/create', - 'action:saved_objects/server/bulk_create', - 'action:saved_objects/server/delete', - 'action:saved_objects/server/get', - 'action:saved_objects/server/bulk_get', - 'action:saved_objects/server/find', - 'action:saved_objects/server/update', - ], - read: [ - `version:${version}`, - 'action:login', - 'action:saved_objects/config/get', - 'action:saved_objects/config/bulk_get', - 'action:saved_objects/config/find', - 'action:saved_objects/timelion-sheet/get', - 'action:saved_objects/timelion-sheet/bulk_get', - 'action:saved_objects/timelion-sheet/find', - 'action:saved_objects/graph-workspace/get', - 'action:saved_objects/graph-workspace/bulk_get', - 'action:saved_objects/graph-workspace/find', - 'action:saved_objects/space/get', - 'action:saved_objects/space/bulk_get', - 'action:saved_objects/space/find', - 'action:saved_objects/index-pattern/get', - 'action:saved_objects/index-pattern/bulk_get', - 'action:saved_objects/index-pattern/find', - 'action:saved_objects/visualization/get', - 'action:saved_objects/visualization/bulk_get', - 'action:saved_objects/visualization/find', - 'action:saved_objects/search/get', - 'action:saved_objects/search/bulk_get', - 'action:saved_objects/search/find', - 'action:saved_objects/dashboard/get', - 'action:saved_objects/dashboard/bulk_get', - 'action:saved_objects/dashboard/find', - 'action:saved_objects/url/get', - 'action:saved_objects/url/bulk_get', - 'action:saved_objects/url/find', - 'action:saved_objects/server/get', - 'action:saved_objects/server/bulk_get', - 'action:saved_objects/server/find', - ], - }, - }); - }); - }); - }); -}