Skip to content

Commit e897d8f

Browse files
committed
Improved integration test runner
1 parent 4537308 commit e897d8f

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

test/integration/index.js

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,28 @@ const customSkips = [
4343
]
4444
const platinumBlackList = {
4545
// file path: test name
46-
'cat.aliases/10_basic.yml': 'Empty cluster',
47-
'index/10_with_id.yml': 'Index with ID',
48-
'indices.get_alias/10_basic.yml': 'Get alias against closed indices',
49-
'indices.get_alias/20_empty.yml': 'Check empty aliases when getting all aliases via /_alias',
46+
'cat.aliases/10_basic.yml': ['Empty cluster'],
47+
'index/10_with_id.yml': ['Index with ID'],
48+
'indices.get_alias/10_basic.yml': ['Get alias against closed indices'],
49+
'indices.get_alias/20_empty.yml': ['Check empty aliases when getting all aliases via /_alias'],
5050
// https://github.com/elastic/elasticsearch/pull/39400
51-
'ml/jobs_crud.yml': 'Test put job with id that is already taken',
51+
'ml/jobs_crud.yml': ['Test put job with id that is already taken'],
5252
// TODO: investigate why this is failing
53-
'monitoring/bulk/10_basic.yml': '*',
54-
'monitoring/bulk/20_privileges.yml': '*',
55-
'license/20_put_license.yml': '*',
56-
'snapshot/10_basic.yml': '*',
53+
'monitoring/bulk/10_basic.yml': ['*'],
54+
'monitoring/bulk/20_privileges.yml': ['*'],
55+
'license/20_put_license.yml': ['*'],
56+
'snapshot/10_basic.yml': ['*'],
5757
// the body is correct, but the regex is failing
58-
'sql/sql.yml': 'Getting textual representation',
58+
'sql/sql.yml': ['Getting textual representation'],
5959
// we are setting two certificates in the docker config
60-
'ssl/10_basic.yml': '*',
60+
'ssl/10_basic.yml': ['*'],
6161
// docker issue?
62-
'watcher/execute_watch/60_http_input.yml': '*',
62+
'watcher/execute_watch/60_http_input.yml': ['*'],
6363
// the checks are correct, but for some reason the test is failing on js side
6464
// I bet is because the backslashes in the rg
65-
'watcher/execute_watch/70_invalid.yml': '*',
66-
'watcher/put_watch/10_basic.yml': '*',
67-
'xpack/15_basic.yml': '*'
65+
'watcher/execute_watch/70_invalid.yml': ['*'],
66+
'watcher/put_watch/10_basic.yml': ['*'],
67+
'xpack/15_basic.yml': ['*']
6868
}
6969

7070
function Runner (opts) {
@@ -93,7 +93,7 @@ Runner.prototype.waitCluster = function (callback, times = 0) {
9393
this.client.cluster.health(
9494
{ waitForStatus: 'green', timeout: '50s' },
9595
(err, res) => {
96-
if (++times < 10) {
96+
if (err && ++times < 10) {
9797
setTimeout(() => {
9898
this.waitCluster(callback, times)
9999
}, 5000)
@@ -184,10 +184,13 @@ Runner.prototype.start = function (opts) {
184184
if (opts.isPlatinum) {
185185
const list = Object.keys(platinumBlackList)
186186
for (i = 0; i < list.length; i++) {
187-
if (file.endsWith(list[i]) && (name === platinumBlackList[list[i]] || platinumBlackList[list[i]] === '*')) {
188-
const testName = file.slice(file.indexOf(`${sep}elasticsearch${sep}`)) + ' / ' + name
189-
tap.skip(`Skipping test ${testName} because is blacklisted in the platinum test`)
190-
return
187+
const platTest = platinumBlackList[list[i]]
188+
for (var j = 0; j < platTest.length; j++) {
189+
if (file.endsWith(list[i]) && (name === platTest[j] || platTest[j] === '*')) {
190+
const testName = file.slice(file.indexOf(`${sep}elasticsearch${sep}`)) + ' / ' + name
191+
tap.skip(`Skipping test ${testName} because is blacklisted in the platinum test`)
192+
return
193+
}
191194
}
192195
}
193196
}

0 commit comments

Comments
 (0)