Update integration test (#1493)
This commit is contained in:
committed by
GitHub
parent
d2ce46b8e0
commit
3137780d6b
@ -7,7 +7,7 @@
|
|||||||
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
|
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
|
||||||
# Export the NUMBER_OF_NODES variable to start more than 1 node
|
# Export the NUMBER_OF_NODES variable to start more than 1 node
|
||||||
|
|
||||||
# Version 1.3.0
|
# Version 1.4.0
|
||||||
# - Initial version of the run-elasticsearch.sh script
|
# - Initial version of the run-elasticsearch.sh script
|
||||||
# - Deleting the volume should not dependent on the container still running
|
# - Deleting the volume should not dependent on the container still running
|
||||||
# - Fixed `ES_JAVA_OPTS` config
|
# - Fixed `ES_JAVA_OPTS` config
|
||||||
@ -17,6 +17,7 @@
|
|||||||
# - Added 5 retries on docker pull for fixing transient network errors
|
# - Added 5 retries on docker pull for fixing transient network errors
|
||||||
# - Added flags to make local CCR configurations work
|
# - Added flags to make local CCR configurations work
|
||||||
# - Added action.destructive_requires_name=false as the default will be true in v8
|
# - Added action.destructive_requires_name=false as the default will be true in v8
|
||||||
|
# - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing
|
||||||
|
|
||||||
script_path=$(dirname $(realpath -s $0))
|
script_path=$(dirname $(realpath -s $0))
|
||||||
source $script_path/functions/imports.sh
|
source $script_path/functions/imports.sh
|
||||||
@ -40,6 +41,7 @@ environment=($(cat <<-END
|
|||||||
--env path.repo=/tmp
|
--env path.repo=/tmp
|
||||||
--env repositories.url.allowed_urls=http://snapshot.test*
|
--env repositories.url.allowed_urls=http://snapshot.test*
|
||||||
--env action.destructive_requires_name=false
|
--env action.destructive_requires_name=false
|
||||||
|
--env ingest.geoip.downloader.enabled=false
|
||||||
END
|
END
|
||||||
))
|
))
|
||||||
if [[ "$TEST_SUITE" == "platinum" ]]; then
|
if [[ "$TEST_SUITE" == "platinum" ]]; then
|
||||||
|
|||||||
@ -45,6 +45,8 @@ const freeSkips = {
|
|||||||
// TODO: remove this once 'arbitrary_key' is implemented
|
// TODO: remove this once 'arbitrary_key' is implemented
|
||||||
// https://github.com/elastic/elasticsearch/pull/41492
|
// https://github.com/elastic/elasticsearch/pull/41492
|
||||||
'indices.split/30_copy_settings.yml': ['*'],
|
'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`
|
// skipping because we are booting ES with `discovery.type=single-node`
|
||||||
// and this test will fail because of this configuration
|
// and this test will fail because of this configuration
|
||||||
'nodes.stats/30_discovery.yml': ['*'],
|
'nodes.stats/30_discovery.yml': ['*'],
|
||||||
@ -56,6 +58,7 @@ const freeSkips = {
|
|||||||
'search/320_disallow_queries.yml': ['Test disallow expensive queries']
|
'search/320_disallow_queries.yml': ['Test disallow expensive queries']
|
||||||
}
|
}
|
||||||
const platinumBlackList = {
|
const platinumBlackList = {
|
||||||
|
'analytics/histogram.yml': ['Histogram requires values in increasing order'],
|
||||||
// this two test cases are broken, we should
|
// this two test cases are broken, we should
|
||||||
// return on those in the future.
|
// return on those in the future.
|
||||||
'analytics/top_metrics.yml': [
|
'analytics/top_metrics.yml': [
|
||||||
|
|||||||
@ -80,6 +80,18 @@ function build (opts = {}) {
|
|||||||
|
|
||||||
// remove 'x_pack_rest_user', used in some xpack test
|
// remove 'x_pack_rest_user', used in some xpack test
|
||||||
await client.security.deleteUser({ username: 'x_pack_rest_user' }, { ignore: [404] })
|
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
|
// 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
|
// wait for pending task before resolving the promise
|
||||||
await sleep(100)
|
await sleep(100)
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|||||||
Reference in New Issue
Block a user