-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Migrations] Provide testing archives + tooling for migrations integr…
…ation tests (#193328) ## Summary Part of elastic/kibana-team#1113 * Creates zip packages that can be used by multiple tests. * Provides tooling to easily create new packages with any desired data and ES version. * Fixes some of the failing tests with the newly created archives.
- Loading branch information
1 parent
d56a1bb
commit 773e747
Showing
22 changed files
with
695 additions
and
1,059 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-2.53 MB
...ver/integration_tests/saved_objects/migrations/archives/7.13_1.5k_failed_action_tasks.zip
Binary file not shown.
Binary file added
BIN
+214 KB
...ore/server/integration_tests/saved_objects/migrations/archives/9.0.0_baseline_1k_docs.zip
Binary file not shown.
Binary file renamed
BIN
+22.5 MB
...jects/migrations/archives/1m_dummy_so.zip → ...ons/archives/9.0.0_baseline_500k_docs.zip
Binary file not shown.
133 changes: 0 additions & 133 deletions
133
src/core/server/integration_tests/saved_objects/migrations/group1/7.7.2_xpack_100k.test.ts
This file was deleted.
Oops, something went wrong.
159 changes: 0 additions & 159 deletions
159
...rver/integration_tests/saved_objects/migrations/group1/7_13_0_failed_action_tasks.test.ts
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...ore/server/integration_tests/saved_objects/migrations/group1/create_test_archives.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
import { getBaselineDocuments } from '../kibana_migrator_test_kit.fixtures'; | ||
import { | ||
BASELINE_DOCUMENTS_PER_TYPE_1K, | ||
BASELINE_DOCUMENTS_PER_TYPE_500K, | ||
BASELINE_ELASTICSEARCH_VERSION, | ||
BASELINE_TEST_ARCHIVE_1K, | ||
BASELINE_TEST_ARCHIVE_500K, | ||
createBaselineArchive, | ||
} from '../kibana_migrator_archive_utils'; | ||
|
||
/** | ||
* Enable and execute this test ONLY IN YOUR DEV MACHINE, in order to build new test packages | ||
*/ | ||
describe.skip('migration tests toolkit', () => { | ||
it('can create a 1k documents ZIP archive', async () => { | ||
await createBaselineArchive({ | ||
esVersion: BASELINE_ELASTICSEARCH_VERSION, | ||
documents: getBaselineDocuments({ documentsPerType: BASELINE_DOCUMENTS_PER_TYPE_1K }), | ||
dataArchive: BASELINE_TEST_ARCHIVE_1K, | ||
}); | ||
}); | ||
|
||
it('can create a 400k documents ZIP archive', async () => { | ||
await createBaselineArchive({ | ||
esVersion: BASELINE_ELASTICSEARCH_VERSION, | ||
documents: getBaselineDocuments({ documentsPerType: BASELINE_DOCUMENTS_PER_TYPE_500K }), | ||
dataArchive: BASELINE_TEST_ARCHIVE_500K, | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.