Update integration test (#1493)

This commit is contained in:
Tomas Della Vedova
2021-07-16 10:00:24 +02:00
committed by delvedor
parent 5a6f5573e8
commit 718630afc9
3 changed files with 30 additions and 2 deletions

View File

@ -47,6 +47,8 @@ const freeSkips = {
// TODO: remove this once 'arbitrary_key' is implemented
// https://github.com/elastic/elasticsearch/pull/41492
'indices.split/30_copy_settings.yml': ['*'],
'indices.stats/50_disk_usage.yml': ['Disk usage stats'],
'indices.stats/60_field_usage.yml': ['Field usage stats'],
// skipping because we are booting ES with `discovery.type=single-node`
// and this test will fail because of this configuration
'nodes.stats/30_discovery.yml': ['*'],
@ -55,6 +57,7 @@ const freeSkips = {
'search.aggregation/240_max_buckets.yml': ['*']
}
const platinumBlackList = {
'analytics/histogram.yml': ['Histogram requires values in increasing order'],
// this two test cases are broken, we should
// return on those in the future.
'analytics/top_metrics.yml': [

View File

@ -80,6 +80,18 @@ function build (opts = {}) {
// remove 'x_pack_rest_user', used in some xpack test
await client.security.deleteUser({ username: 'x_pack_rest_user' }, { ignore: [404] })
const { body: searchableSnapshotIndices } = await client.cluster.state({
metric: 'metadata',
filter_path: 'metadata.indices.*.settings.index.store.snapshot'
})
if (searchableSnapshotIndices.metadata != null && searchableSnapshotIndices.metadata.indices != null) {
await helper.runInParallel(
client, 'indices.delete',
Object.keys(searchableSnapshotIndices.metadata.indices).map(i => ({ index: i })),
{ ignore: [404] }
)
}
}
// clean snapshots
@ -164,6 +176,13 @@ function build (opts = {}) {
)
}
const { body: shutdownNodes } = await client.shutdown.getNode()
if (shutdownNodes._nodes == null && shutdownNodes.cluster_name == null) {
for (const node of shutdownNodes.nodes) {
await client.shutdown.deleteNode({ node_id: node.node_id })
}
}
// wait for pending task before resolving the promise
await sleep(100)
while (true) {