Improve integration test (#859)

* CI: Added junit plugin

* Updated .gitignore

* Added integration test reporter

* Updated integration testing suite

* Updated ci config

* Updated report file path

* Use refresh 'true' instead of 'wait_for'

* Disable junit reporting

* Refresh one single time

* Update security index name

* Updated skip test handling and use class syntax

* Updated test script

* Disable test timeout

* Added command to automatically remove an old snapshot

* Disable timeout in integration test script

* Updated logs and cleaned up git handling

* Fixed shouldSkip utility

* Updated cleanup code

* Updated cleanup code pt 2

* Rename Platinum to XPack
This commit is contained in:
Tomas Della Vedova
2019-07-10 15:27:44 +02:00
committed by GitHub
parent ea3cd7dd58
commit 6c8b99f78a
8 changed files with 853 additions and 891 deletions

View File

@ -58,11 +58,11 @@ const esDefaultUsers = [
'remote_monitoring_user'
]
function runInParallel (client, operation, options) {
function runInParallel (client, operation, options, clientOptions) {
if (options.length === 0) return Promise.resolve()
const operations = options.map(opts => {
const api = delve(client, operation).bind(client)
return api(opts)
return api(opts, clientOptions)
})
return Promise.all(operations)
@ -82,4 +82,10 @@ function delve (obj, key, def, p) {
return (obj === undefined || p < key.length) ? def : obj
}
module.exports = { runInParallel, esDefaultRoles, esDefaultUsers, delve }
function to (promise) {
return promise.then(data => [null, data], err => [err, undefined])
}
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
module.exports = { runInParallel, esDefaultRoles, esDefaultUsers, delve, to, sleep }