-
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.
Browse files
Browse the repository at this point in the history
* Temporary fix to get tests working again with data streams * Removing mappings and renabling tests * optionally using create for our tests only has a stop gap * Adding default for internal function * Removing tests that could fail if backing index changes * Removing unused import Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
a121d35
commit 4b16bfa
Showing
13 changed files
with
79 additions
and
3,246 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
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
32 changes: 32 additions & 0 deletions
32
x-pack/test/api_integration/apis/endpoint/data_stream_helper.ts
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,32 @@ | ||
/* | ||
* 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 { Client } from '@elastic/elasticsearch'; | ||
|
||
export async function deleteDataStream(getService: (serviceName: 'es') => Client, index: string) { | ||
const client = getService('es'); | ||
await client.transport.request( | ||
{ | ||
method: 'DELETE', | ||
path: `_data_stream/${index}`, | ||
}, | ||
{ | ||
ignore: [404], | ||
} | ||
); | ||
} | ||
|
||
export async function deleteMetadataStream(getService: (serviceName: 'es') => Client) { | ||
await deleteDataStream(getService, 'metrics-endpoint.metadata-*'); | ||
} | ||
|
||
export async function deleteEventsStream(getService: (serviceName: 'es') => Client) { | ||
await deleteDataStream(getService, 'events-endpoint-*'); | ||
} | ||
|
||
export async function deletePolicyStream(getService: (serviceName: 'es') => Client) { | ||
await deleteDataStream(getService, 'metrics-endpoint.policy-*'); | ||
} |
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
Oops, something went wrong.