Skip to content

Commit

Permalink
Update TransportGetFeatureUpgradeStatusActionTests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-ivanov-es committed Dec 11, 2024
1 parent 6736d8c commit cc9268c
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.cluster.metadata.Metadata;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.core.UpdateForV9;
import org.elasticsearch.index.IndexVersion;
import org.elasticsearch.index.IndexVersions;
import org.elasticsearch.indices.SystemIndexDescriptor;
import org.elasticsearch.indices.SystemIndexDescriptorUtils;
import org.elasticsearch.indices.SystemIndices;
Expand All @@ -31,7 +31,8 @@
public class TransportGetFeatureUpgradeStatusActionTests extends ESTestCase {

public static String TEST_SYSTEM_INDEX_PATTERN = ".test*";
private static final IndexVersion TEST_OLD_VERSION = IndexVersion.fromId(6000099);
// Version just before MINIMUM_COMPATIBLE in order to check that UpgradeStatus.MIGRATION_NEEDED is set correctly
private static final IndexVersion TEST_OLD_VERSION = IndexVersion.fromId(IndexVersions.MINIMUM_COMPATIBLE.id() - 100);
private static final ClusterState CLUSTER_STATE = getClusterState();
private static final SystemIndices.Feature FEATURE = getFeature();

Expand Down Expand Up @@ -85,8 +86,6 @@ private static ClusterState getClusterState() {
.numberOfReplicas(0)
.build();

@UpdateForV9(owner = UpdateForV9.Owner.CORE_INFRA)
// Once we start testing 9.x, we should update this test to use a 7.x "version created"
IndexMetadata indexMetadata2 = IndexMetadata.builder(".test-index-2")
.settings(Settings.builder().put("index.version.created", TEST_OLD_VERSION).build())
.numberOfShards(1)
Expand Down

0 comments on commit cc9268c

Please sign in to comment.