forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit 23515b1 Author: kobelb <brandon.kobel@elastic.co> Date: Mon Sep 10 06:57:58 2018 -0400 Adding more users to the spaces tests commit 4bbde73 Author: kobelb <brandon.kobel@elastic.co> Date: Mon Sep 10 06:09:35 2018 -0400 Adding not space aware get tests commit 5d11bef Author: kobelb <brandon.kobel@elastic.co> Date: Sat Sep 8 14:06:20 2018 -0400 Adding not space aware test to find commit f9383fd Author: kobelb <brandon.kobel@elastic.co> Date: Sat Sep 8 13:49:04 2018 -0400 Adding bulk create tests and testing non space aware type with bulkGet commit 5388b5a Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 16:18:04 2018 -0400 Adding bulk create test commit 0674263 Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 15:58:21 2018 -0400 Ignoring some modules commit 6b011d3 Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 15:55:58 2018 -0400 Making the users match for saved objects security and spaces commit de2f994 Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 14:18:53 2018 -0400 Making the space suites define their own test expectations commit 5407866 Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 13:15:46 2018 -0400 Removing redundant spaces folder commit 9913923 Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 13:14:45 2018 -0400 Removing unneeded objects from the esarchive commit bc602b1 Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 13:08:12 2018 -0400 Moving some tests around commit 7fec308 Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 12:38:23 2018 -0400 Deleting rbac_api_integration tests, they've been migrated elsewhere commit 29c018e Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 10:01:16 2018 -0400 Importing SuperTest where needed commit 38d2e74 Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 08:44:53 2018 -0400 Removing the "saved_objects" folder commit 70eada4 Merge: 1b2708f 9023431 Author: Brandon Kobel <brandon.kobel@gmail.com> Date: Fri Sep 7 10:04:03 2018 -0400 Merge pull request #4 from legrego/spaces-api-tests Initial round of spaces api testing commit 9023431 Merge: 6410f72 1b2708f Author: Larry Gregory <larry.gregory@elastic.co> Date: Fri Sep 7 09:37:57 2018 -0400 Merge remote-tracking branch 'kobelb/spaces/securing-api-tests' into spaces-api-tests commit 1b2708f Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 08:17:25 2018 -0400 Even more typescript commit 369a429 Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 08:08:28 2018 -0400 Typescriptifying Get commit f53f2ab Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 08:01:48 2018 -0400 Typescriptifying Find commit f707e03 Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 07:55:10 2018 -0400 Typescriptifying Create commit 485d983 Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 07:31:54 2018 -0400 Changing the namespace agnostic type name commit 71c2122 Author: kobelb <brandon.kobel@elastic.co> Date: Fri Sep 7 07:25:15 2018 -0400 Adding update tests commit f60e953 Author: kobelb <brandon.kobel@elastic.co> Date: Thu Sep 6 15:53:34 2018 -0400 Delete tests commit 94682e5 Author: kobelb <brandon.kobel@elastic.co> Date: Thu Sep 6 12:07:39 2018 -0400 Adding get security and spaces tests commit 481943f Author: kobelb <brandon.kobel@elastic.co> Date: Thu Sep 6 11:58:42 2018 -0400 Generalizing bulk get commit 14d9058 Merge: 6627127 fc5f7fa Author: Brandon Kobel <brandon.kobel@gmail.com> Date: Thu Sep 6 10:46:07 2018 -0400 Merge pull request #3 from legrego/remove-privs-api Remove privs api and hardcoded privs list commit 6410f72 Author: Larry Gregory <larry.gregory@elastic.co> Date: Thu Sep 6 09:35:30 2018 -0400 add missing superagent type commit 4afacc0 Author: Larry Gregory <larry.gregory@elastic.co> Date: Wed Sep 5 20:19:15 2018 -0400 initial round of spaces api testing commit 6627127 Author: kobelb <brandon.kobel@elastic.co> Date: Wed Sep 5 17:29:37 2018 -0400 Adding GET test suite commit 68a5537 Author: kobelb <brandon.kobel@elastic.co> Date: Wed Sep 5 13:32:49 2018 -0400 Copying find to security and spaces commit fc5f7fa Author: Larry Gregory <larry.gregory@elastic.co> Date: Wed Sep 5 12:36:30 2018 -0400 move es privilege tests to api_integration commit 189fbe6 Author: kobelb <brandon.kobel@elastic.co> Date: Wed Sep 5 12:24:41 2018 -0400 Switching approach to dynamically enabling security commit c72200f Author: Larry Gregory <larry.gregory@elastic.co> Date: Wed Sep 5 11:57:26 2018 -0400 remove get privileges api commit 1607f80 Author: kobelb <brandon.kobel@elastic.co> Date: Wed Sep 5 11:47:19 2018 -0400 Dynamically supplying users so we reduce some duplication commit 9deec1b Author: kobelb <brandon.kobel@elastic.co> Date: Wed Sep 5 09:32:36 2018 -0400 Security and Spaces create tests commit a8232dd Author: kobelb <brandon.kobel@elastic.co> Date: Wed Sep 5 07:22:10 2018 -0400 Using a create "test suite" commit f07f668 Author: kobelb <brandon.kobel@elastic.co> Date: Wed Sep 5 05:54:46 2018 -0400 Using the spaces esArchive always now commit b2021ad Merge: d3babea 7b4575b Author: kobelb <brandon.kobel@elastic.co> Date: Wed Sep 5 05:43:48 2018 -0400 Merge branch 'spaces/securing' into spaces/securing-api-tests commit d3babea Author: kobelb <brandon.kobel@elastic.co> Date: Tue Sep 4 17:43:38 2018 -0400 Moving over the spaces only saved objects tests commit 94054a2 Author: kobelb <brandon.kobel@elastic.co> Date: Tue Sep 4 17:26:43 2018 -0400 Copying over the security only saved object api tests
- Loading branch information
Showing
132 changed files
with
9,861 additions
and
5,369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import expect from 'expect.js'; | ||
|
||
export default function ({ getService }) { | ||
const supertest = getService('supertest'); | ||
const es = getService('es'); | ||
const esArchiver = getService('esArchiver'); | ||
|
||
const BULK_REQUESTS = [ | ||
{ | ||
type: 'visualization', | ||
id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', | ||
attributes: { | ||
title: 'An existing visualization' | ||
} | ||
}, | ||
{ | ||
type: 'dashboard', | ||
id: 'a01b2f57-fcfd-4864-b735-09e28f0d815e', | ||
attributes: { | ||
title: 'A great new dashboard' | ||
} | ||
}, | ||
]; | ||
|
||
describe('_bulk_create', () => { | ||
describe('with kibana index', () => { | ||
before(() => esArchiver.load('saved_objects/basic')); | ||
after(() => esArchiver.unload('saved_objects/basic')); | ||
|
||
it('should return 200 with individual responses', async () => ( | ||
await supertest | ||
.post(`/api/saved_objects/_bulk_create`) | ||
.send(BULK_REQUESTS) | ||
.expect(200) | ||
.then(resp => { | ||
expect(resp.body).to.eql({ | ||
saved_objects: [ | ||
{ | ||
type: 'visualization', | ||
id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', | ||
error: { | ||
'message': 'version conflict, document already exists', | ||
'statusCode': 409 | ||
} | ||
}, | ||
{ | ||
type: 'dashboard', | ||
id: 'a01b2f57-fcfd-4864-b735-09e28f0d815e', | ||
updated_at: resp.body.saved_objects[1].updated_at, | ||
version: 1, | ||
attributes: { | ||
title: 'A great new dashboard' | ||
} | ||
}, | ||
] | ||
}); | ||
}) | ||
)); | ||
}); | ||
|
||
describe('without kibana index', () => { | ||
before(async () => ( | ||
// just in case the kibana server has recreated it | ||
await es.indices.delete({ | ||
index: '.kibana', | ||
ignore: [404], | ||
}) | ||
)); | ||
|
||
it('should return 200 with individual responses', async () => ( | ||
await supertest | ||
.post('/api/saved_objects/_bulk_create') | ||
.send(BULK_REQUESTS) | ||
.expect(200) | ||
.then(resp => { | ||
expect(resp.body).to.eql({ | ||
saved_objects: [ | ||
{ | ||
type: 'visualization', | ||
id: 'dd7caf20-9efd-11e7-acb3-3dab96693fab', | ||
updated_at: resp.body.saved_objects[0].updated_at, | ||
version: 1, | ||
attributes: { | ||
title: 'An existing visualization' | ||
} | ||
}, | ||
{ | ||
type: 'dashboard', | ||
id: 'a01b2f57-fcfd-4864-b735-09e28f0d815e', | ||
updated_at: resp.body.saved_objects[1].updated_at, | ||
version: 1, | ||
attributes: { | ||
title: 'A great new dashboard' | ||
} | ||
}, | ||
] | ||
}); | ||
}) | ||
)); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
x-pack/plugins/security/server/routes/api/v1/privileges.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.