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

release-23.1: upgrademanager: audit tests that use MakeTestingClusterSettingsWithVersions #100899

Merged
merged 1 commit into from
Apr 13, 2023
Merged
Changes from all commits
Commits
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
14 changes: 8 additions & 6 deletions pkg/upgrade/upgrademanager/manager_external_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,19 @@ func TestMigrateUpdatesReplicaVersion(t *testing.T) {
defer log.Scope(t).Close(t)

// We're going to be migrating from startCV to endCV.
startCV := roachpb.Version{Major: 41}
endCV := roachpb.Version{Major: 42}
startCVKey := clusterversion.V22_2
startCV := clusterversion.ByKey(startCVKey)
endCVKey := startCVKey + 1
endCV := clusterversion.ByKey(endCVKey)

var desc roachpb.RangeDescriptor
ctx := context.Background()
tc := testcluster.StartTestCluster(t, 2, base.TestClusterArgs{
ReplicationMode: base.ReplicationManual,
ServerArgs: base.TestServerArgs{
Settings: cluster.MakeTestingClusterSettingsWithVersions(endCV, startCV, false),
Knobs: base.TestingKnobs{
Server: &server.TestingKnobs{
BootstrapVersionKeyOverride: clusterversion.BinaryMinSupportedVersionKey,
BinaryVersionOverride: startCV,
DisableAutomaticVersionUpgrade: make(chan struct{}),
},
Expand Down Expand Up @@ -323,11 +325,11 @@ func TestConcurrentMigrationAttempts(t *testing.T) {

skip.WithIssue(t, 101021, "flaky test")
// We're going to be migrating from the current version to imaginary future versions.
current := clusterversion.ByKey(clusterversion.BinaryVersionKey)
current := clusterversion.TestingBinaryMinSupportedVersion
versions := []roachpb.Version{current}
for i := int32(1); i <= 6; i++ {
for i := int32(1); i <= 5; i++ {
v := current
v.Major += i
v.Internal += i * 2
versions = append(versions, v)
}

Expand Down