Kibana app migration: Remove old apis (#50881)

This commit is contained in:
Joe Reuter 2019-12-03 14:32:18 +01:00 committed by GitHub
parent 0732067dc2
commit 86b3428115
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 0 additions and 212 deletions

View file

@ -1,61 +0,0 @@
/*
* 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 '@kbn/expect';
export default function ({ getService }) {
const esArchiver = getService('esArchiver');
const supertest = getService('supertest');
describe('Count API', function postIngest() {
before(() => esArchiver.load('search/count'));
after(() => esArchiver.unload('search/count'));
it('should return 200 with a document count for existing indices', () => (
supertest
.post('/api/kibana/foo-*/_count')
.expect(200)
.then((response) => {
expect(response.body.count).to.be(2);
})
));
it('should support GET requests as well', () => (
supertest
.get('/api/kibana/foo-*/_count')
.expect(200)
.then((response) => {
expect(response.body.count).to.be(2);
})
));
it('should return 404 if a pattern matches no indices', () => (
supertest
.post('/api/kibana/doesnotexist-*/_count')
.expect(404)
));
it('should return 404 if a concrete index does not exist', () => (
supertest
.post('/api/kibana/concrete/_count')
.expect(404)
));
});
}

View file

@ -1,24 +0,0 @@
/*
* 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.
*/
export default function ({ loadTestFile }) {
describe('search', () => {
loadTestFile(require.resolve('./count'));
});
}