From 8374b55e1e05f6984d4859dbb0e125acdc41423c Mon Sep 17 00:00:00 2001 From: Ahmad Bamieh Date: Mon, 28 Jun 2021 09:54:39 +0300 Subject: [PATCH 1/7] Update migration_7.7.2_xpack_100k.test.ts --- .../integration_tests/migration_7.7.2_xpack_100k.test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts b/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts index cb7f5a000cefb..0e51c886f7f30 100644 --- a/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts +++ b/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts @@ -26,8 +26,7 @@ async function removeLogFile() { await asyncUnlink(logFilePath).catch(() => void 0); } -// FAILING on 7.13: https://github.com/elastic/kibana/issues/96895 -describe.skip('migration from 7.7.2-xpack with 100k objects', () => { +describe('migration from 7.7.2-xpack with 100k objects', () => { let esServer: kbnTestServer.TestElasticsearchUtils; let root: Root; let coreStart: InternalCoreStart; From 6585a93ca402aa43ade76e05c227b57318585e4a Mon Sep 17 00:00:00 2001 From: Ahmad Bamieh Date: Mon, 28 Jun 2021 10:12:36 +0300 Subject: [PATCH 2/7] Update jest.config.integration.js --- jest.config.integration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.integration.js b/jest.config.integration.js index b6ecb4569b643..c3dbd61f94312 100644 --- a/jest.config.integration.js +++ b/jest.config.integration.js @@ -12,7 +12,7 @@ module.exports = { preset: '@kbn/test', rootDir: '.', roots: ['/src', '/packages'], - testMatch: ['**/integration_tests**/*.test.{js,mjs,ts,tsx}'], + testMatch: ['**/integration_tests**/migration_7.7.2_xpack_100k.test.{js,mjs,ts,tsx}'], testPathIgnorePatterns: preset.testPathIgnorePatterns.filter( (pattern) => !pattern.includes('integration_tests') ), From ada5b436d334f219259f35e5b8cd884fad3e1e8d Mon Sep 17 00:00:00 2001 From: Ahmad Bamieh Date: Mon, 28 Jun 2021 12:22:41 +0300 Subject: [PATCH 3/7] Update jest.config.integration.js --- jest.config.integration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.integration.js b/jest.config.integration.js index c3dbd61f94312..ffb1727afc240 100644 --- a/jest.config.integration.js +++ b/jest.config.integration.js @@ -12,7 +12,7 @@ module.exports = { preset: '@kbn/test', rootDir: '.', roots: ['/src', '/packages'], - testMatch: ['**/integration_tests**/migration_7.7.2_xpack_100k.test.{js,mjs,ts,tsx}'], + testMatch: ['**/integration_tests**/migrationsv2/*.test.{js,mjs,ts,tsx}'], testPathIgnorePatterns: preset.testPathIgnorePatterns.filter( (pattern) => !pattern.includes('integration_tests') ), From 57a57fc3620bf3c2a9c556f852e1433845829844 Mon Sep 17 00:00:00 2001 From: Ahmad Bamieh Date: Mon, 28 Jun 2021 13:25:33 +0300 Subject: [PATCH 4/7] Update jest.config.integration.js --- jest.config.integration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.integration.js b/jest.config.integration.js index ffb1727afc240..27c069638aa0e 100644 --- a/jest.config.integration.js +++ b/jest.config.integration.js @@ -12,7 +12,7 @@ module.exports = { preset: '@kbn/test', rootDir: '.', roots: ['/src', '/packages'], - testMatch: ['**/integration_tests**/migrationsv2/*.test.{js,mjs,ts,tsx}'], + testMatch: ['**/migrationsv2/integration_tests**/*.test.{js,mjs,ts,tsx}'], testPathIgnorePatterns: preset.testPathIgnorePatterns.filter( (pattern) => !pattern.includes('integration_tests') ), From 701f34384225626e6306487c924f3936cd7d1b43 Mon Sep 17 00:00:00 2001 From: Ahmad Bamieh Date: Mon, 28 Jun 2021 14:21:17 +0300 Subject: [PATCH 5/7] Update migration_7.7.2_xpack_100k.test.ts --- .../migration_7.7.2_xpack_100k.test.ts | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts b/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts index 0e51c886f7f30..1d71e4d8527b4 100644 --- a/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts +++ b/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import Path from 'path'; -import Fs from 'fs'; +import path from 'path'; +import { unlink } from 'fs/promises'; import Util from 'util'; import { REPO_ROOT } from '@kbn/dev-utils'; import { Env } from '@kbn/config'; @@ -18,12 +18,11 @@ import { InternalCoreStart } from '../../../internal_types'; import { Root } from '../../../root'; const kibanaVersion = Env.createDefault(REPO_ROOT, getEnvOptions()).packageInfo.version; -const logFilePath = Path.join(__dirname, 'migration_test_kibana.log'); +const logFilePath = path.join(__dirname, 'migration_test_kibana.log'); -const asyncUnlink = Util.promisify(Fs.unlink); async function removeLogFile() { // ignore errors if it doesn't exist - await asyncUnlink(logFilePath).catch(() => void 0); + await unlink(logFilePath).catch(() => void 0); } describe('migration from 7.7.2-xpack with 100k objects', () => { @@ -63,12 +62,9 @@ describe('migration from 7.7.2-xpack with 100k objects', () => { }, }, }, - loggers: [ - { - name: 'root', - appenders: ['file'], - }, - ], + root: { + appenders: ['default', 'file'], + }, }, }, { @@ -105,7 +101,7 @@ describe('migration from 7.7.2-xpack with 100k objects', () => { await removeLogFile(); await startServers({ oss: false, - dataArchive: Path.join(__dirname, 'archives', '7.7.2_xpack_100k_obj.zip'), + dataArchive: path.join(__dirname, 'archives', '7.7.2_xpack_100k_obj.zip'), }); }); From 4650a1d9f4d1cf3054101a7b231dfcadbc152a43 Mon Sep 17 00:00:00 2001 From: Ahmad Bamieh Date: Mon, 28 Jun 2021 14:21:39 +0300 Subject: [PATCH 6/7] Update migration_7.7.2_xpack_100k.test.ts --- .../integration_tests/migration_7.7.2_xpack_100k.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts b/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts index 1d71e4d8527b4..ea807beb83cea 100644 --- a/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts +++ b/src/core/server/saved_objects/migrationsv2/integration_tests/migration_7.7.2_xpack_100k.test.ts @@ -8,7 +8,6 @@ import path from 'path'; import { unlink } from 'fs/promises'; -import Util from 'util'; import { REPO_ROOT } from '@kbn/dev-utils'; import { Env } from '@kbn/config'; import { getEnvOptions } from '@kbn/config/target/mocks'; From b2f7513d969142e7eb813517294691b392623a57 Mon Sep 17 00:00:00 2001 From: Ahmad Bamieh Date: Mon, 28 Jun 2021 15:23:20 +0300 Subject: [PATCH 7/7] Update jest.config.integration.js --- jest.config.integration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.integration.js b/jest.config.integration.js index 27c069638aa0e..b6ecb4569b643 100644 --- a/jest.config.integration.js +++ b/jest.config.integration.js @@ -12,7 +12,7 @@ module.exports = { preset: '@kbn/test', rootDir: '.', roots: ['/src', '/packages'], - testMatch: ['**/migrationsv2/integration_tests**/*.test.{js,mjs,ts,tsx}'], + testMatch: ['**/integration_tests**/*.test.{js,mjs,ts,tsx}'], testPathIgnorePatterns: preset.testPathIgnorePatterns.filter( (pattern) => !pattern.includes('integration_tests') ),