Skip to content

Commit

Permalink
Revert "Fix sharing saved objects phase 2 CI (#89056)"
Browse files Browse the repository at this point in the history
This reverts commit 8263d47.
  • Loading branch information
rudolf committed Jan 28, 2021
1 parent 1693754 commit 951d29a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,20 +206,6 @@ describe('DocumentMigrator', () => {
);
});

it('coerces the current Kibana version if it has a hyphen', () => {
const validDefinition = {
kibanaVersion: '3.2.0-SNAPSHOT',
typeRegistry: createRegistry({
name: 'foo',
convertToMultiNamespaceTypeVersion: '3.2.0',
namespaceType: 'multiple',
}),
minimumConvertVersion: '0.0.0',
log: mockLogger,
};
expect(() => new DocumentMigrator(validDefinition)).not.toThrowError();
});

it('validates convertToMultiNamespaceTypeVersion is not used on a patch version', () => {
const invalidDefinition = {
kibanaVersion: '3.2.3',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,10 @@ export class DocumentMigrator implements VersionedTransformer {
*/
constructor({
typeRegistry,
kibanaVersion: rawKibanaVersion,
kibanaVersion,
minimumConvertVersion = DEFAULT_MINIMUM_CONVERT_VERSION,
log,
}: DocumentMigratorOptions) {
const kibanaVersion = rawKibanaVersion.split('-')[0]; // coerce a semver-like string (x.y.z-SNAPSHOT) or prerelease version (x.y.z-alpha) to a regular semver (x.y.z)
validateMigrationDefinition(typeRegistry, kibanaVersion, minimumConvertVersion);

this.documentMigratorOptions = { typeRegistry, kibanaVersion, log };
Expand Down

0 comments on commit 951d29a

Please sign in to comment.