Skip to content

Commit 2409bd0

Browse files
authored
Fix CI (#1399)
1 parent 9e3072f commit 2409bd0

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

.ci/run-repository.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# parameters are available to this script
33

44
# STACK_VERSION -- version e.g Major.Minor.Patch(-Prelease)
5-
# TEST_SUITE -- which test suite to run: oss or xpack
5+
# TEST_SUITE -- which test suite to run: free or platinum
66
# ELASTICSEARCH_URL -- The url at which elasticsearch is reachable, a default is composed based on STACK_VERSION and TEST_SUITE
77
# NODE_JS_VERSION -- node js version (defined in test-matrix.yml, a default is hardcoded here)
88
script_path=$(dirname $(realpath -s $0))

test/integration/index.js

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const MAX_API_TIME = 1000 * 90
4343
const MAX_FILE_TIME = 1000 * 30
4444
const MAX_TEST_TIME = 1000 * 3
4545

46-
const ossSkips = {
46+
const freeSkips = {
4747
// TODO: remove this once 'arbitrary_key' is implemented
4848
// https://github.com/elastic/elasticsearch/pull/41492
4949
'indices.split/30_copy_settings.yml': ['*'],
@@ -57,7 +57,7 @@ const ossSkips = {
5757
// while null is a valid json value, so the check will fail
5858
'search/320_disallow_queries.yml': ['Test disallow expensive queries']
5959
}
60-
const xPackBlackList = {
60+
const platinumBlackList = {
6161
// this two test cases are broken, we should
6262
// return on those in the future.
6363
'analytics/top_metrics.yml': [
@@ -68,6 +68,7 @@ const xPackBlackList = {
6868
'index/10_with_id.yml': ['Index with ID'],
6969
'indices.get_alias/10_basic.yml': ['Get alias against closed indices'],
7070
'indices.get_alias/20_empty.yml': ['Check empty aliases when getting all aliases via /_alias'],
71+
'text_structure/find_structure.yml': ['*'],
7172
// https://github.com/elastic/elasticsearch/pull/39400
7273
'ml/jobs_crud.yml': ['Test put job with id that is already taken'],
7374
// object keys must me strings, and `0.0.toString()` is `0`
@@ -88,6 +89,7 @@ const xPackBlackList = {
8889
'monitoring/bulk/20_privileges.yml': ['*'],
8990
'license/20_put_license.yml': ['*'],
9091
'snapshot/10_basic.yml': ['*'],
92+
'snapshot/20_operator_privileges_disabled.yml': ['*'],
9193
// the body is correct, but the regex is failing
9294
'sql/sql.yml': ['Getting textual representation'],
9395
// we are setting two certificates in the docker config
@@ -161,9 +163,9 @@ async function start ({ client, isXPack }) {
161163
log(`Checking out sha ${sha}...`)
162164
await withSHA(sha)
163165

164-
log(`Testing ${isXPack ? 'XPack' : 'oss'} api...`)
166+
log(`Testing ${isXPack ? 'Platinum' : 'Free'} api...`)
165167
const junit = createJunitReporter()
166-
const junitTestSuites = junit.testsuites(`Integration test for ${isXPack ? 'XPack' : 'oss'} api`)
168+
const junitTestSuites = junit.testsuites(`Integration test for ${isXPack ? 'Platinum' : 'Free'} api`)
167169

168170
const stats = {
169171
total: 0,
@@ -254,7 +256,7 @@ async function start ({ client, isXPack }) {
254256
junitTestCase.end()
255257
junitTestSuite.end()
256258
junitTestSuites.end()
257-
generateJunitXmlReport(junit, isXPack ? 'xpack' : 'oss')
259+
generateJunitXmlReport(junit, isXPack ? 'platinum' : 'free')
258260
console.error(err)
259261
process.exit(1)
260262
}
@@ -282,7 +284,7 @@ async function start ({ client, isXPack }) {
282284
}
283285
}
284286
junitTestSuites.end()
285-
generateJunitXmlReport(junit, isXPack ? 'xpack' : 'oss')
287+
generateJunitXmlReport(junit, isXPack ? 'platinum' : 'free')
286288
log(`Total testing time: ${ms(now() - totalTime)}`)
287289
log(`Test stats:
288290
- Total: ${stats.total}
@@ -425,26 +427,26 @@ if (require.main === module) {
425427
}
426428

427429
const shouldSkip = (isXPack, file, name) => {
428-
var list = Object.keys(ossSkips)
430+
var list = Object.keys(freeSkips)
429431
for (var i = 0; i < list.length; i++) {
430-
const ossTest = ossSkips[list[i]]
431-
for (var j = 0; j < ossTest.length; j++) {
432-
if (file.endsWith(list[i]) && (name === ossTest[j] || ossTest[j] === '*')) {
432+
const freeTest = freeSkips[list[i]]
433+
for (var j = 0; j < freeTest.length; j++) {
434+
if (file.endsWith(list[i]) && (name === freeTest[j] || freeTest[j] === '*')) {
433435
const testName = file.slice(file.indexOf(`${sep}elasticsearch${sep}`)) + ' / ' + name
434-
log(`Skipping test ${testName} because is blacklisted in the oss test`)
436+
log(`Skipping test ${testName} because is blacklisted in the free test`)
435437
return true
436438
}
437439
}
438440
}
439441

440442
if (file.includes('x-pack') || isXPack) {
441-
list = Object.keys(xPackBlackList)
443+
list = Object.keys(platinumBlackList)
442444
for (i = 0; i < list.length; i++) {
443-
const platTest = xPackBlackList[list[i]]
445+
const platTest = platinumBlackList[list[i]]
444446
for (j = 0; j < platTest.length; j++) {
445447
if (file.endsWith(list[i]) && (name === platTest[j] || platTest[j] === '*')) {
446448
const testName = file.slice(file.indexOf(`${sep}elasticsearch${sep}`)) + ' / ' + name
447-
log(`Skipping test ${testName} because is blacklisted in the XPack test`)
449+
log(`Skipping test ${testName} because is blacklisted in the platinum test`)
448450
return true
449451
}
450452
}

0 commit comments

Comments
 (0)