-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f380922
commit 80d7c01
Showing
5 changed files
with
43 additions
and
84 deletions.
There are no files selected for viewing
82 changes: 0 additions & 82 deletions
82
x-pack/plugins/watcher/server/routes/api/indices/register_get_index_patterns_route.test.ts
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* 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 { FtrProviderContext } from '../../ftr_provider_context'; | ||
|
||
export default function ({ loadTestFile }: FtrProviderContext) { | ||
describe('Watcher', () => { | ||
loadTestFile(require.resolve('./watcher')); | ||
}); | ||
} |
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,26 @@ | ||
/* | ||
* 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'; | ||
|
||
export default function ({ getService }) { | ||
const supertest = getService('supertest'); | ||
|
||
describe('watcher', () => { | ||
describe('POST /api/watcher/indices/index_patterns', () => { | ||
it('returns list of index patterns', async () => { | ||
const response = await supertest | ||
.get('/api/watcher/indices/index_patterns') | ||
.set('kbn-xsrf', 'kibana') | ||
.expect(200); | ||
|
||
const expectedResponse = ['metrics-*', 'logs-*']; | ||
expect(response.body).to.eql(expectedResponse); | ||
}); | ||
}); | ||
}); | ||
} |