Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Migrations] Provide testing archives + tooling for migrations integration tests #193328

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
50b8810
Remove tests related to ID rewriting
gsoldevila Sep 18, 2024
4f59514
Remove `failed_action_tasks` tests
gsoldevila Sep 18, 2024
8dc0c50
Remove `migration_from_older_v1` and `dot_kibana_split` tests
gsoldevila Sep 18, 2024
97bfdf9
Define `reindexing_migration` test (covers failed_action_tasks' exclu…
gsoldevila Sep 18, 2024
fa33a75
Add `migration_from_older_v1` expect statements to this test
gsoldevila Sep 18, 2024
be3898b
Create baseline migrations archives + tooling. Adapt tests
gsoldevila Sep 19, 2024
02482e1
Disable `create_test_archives` pseudo-test
gsoldevila Sep 19, 2024
1e4344c
Add new 'task' type + index to baseline archives, adapt tests
gsoldevila Sep 20, 2024
fb693e2
Update `single_migration_failures` tests to use baseline archive
gsoldevila Sep 20, 2024
17df08a
Revert "Remove tests related to ID rewriting"
gsoldevila Sep 20, 2024
241ad6d
Revert "Remove `failed_action_tasks` tests"
gsoldevila Sep 20, 2024
da7bfa4
Revert "Remove `migration_from_older_v1` and `dot_kibana_split` tests"
gsoldevila Sep 20, 2024
f040d46
Remove unused archive
gsoldevila Sep 20, 2024
c26979d
Fix failing tests
gsoldevila Sep 20, 2024
a1a4e10
Fix TS and linting issues, outdated tests
gsoldevila Sep 20, 2024
9d0cb42
Remove `xpack_100k.test`, covered in `v2_migration.test`
gsoldevila Sep 20, 2024
204d942
Remove tests made obsolete by `Incremental bulk execution`
gsoldevila Sep 22, 2024
76dc8b2
Remove unneccesary test
gsoldevila Sep 23, 2024
592762f
Disable `create_test_archives` test (dev only)
gsoldevila Sep 23, 2024
700e66f
Update test, as any of the two migrators can fail
gsoldevila Sep 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/kbn-test/src/es/test_es_cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export interface CreateTestEsClusterOptions {
* `['key.1=val1', 'key.2=val2']`
*/
esArgs?: string[];
esVersion?: string;
esFrom?: string;
esServerlessOptions?: Pick<
ServerlessOptions,
Expand Down Expand Up @@ -169,6 +170,7 @@ export function createTestEsCluster<
log,
writeLogsToPath,
basePath = Path.resolve(REPO_ROOT, '.es'),
esVersion = esTestConfig.getVersion(),
esFrom = esTestConfig.getBuildFrom(),
esServerlessOptions,
dataArchive,
Expand Down Expand Up @@ -196,7 +198,7 @@ export function createTestEsCluster<
const esArgs = assignArgs(defaultEsArgs, customEsArgs);

const config = {
version: esTestConfig.getVersion(),
version: esVersion,
installPath: Path.resolve(basePath, clusterName),
sourcePath: Path.resolve(REPO_ROOT, '../elasticsearch'),
password,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

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,
});
});
});
Loading