-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
logictest: add test for mixed-version configs
This commit adds a test that verifies that for each supported previous release we have a logictest config that bootstraps the cluster at that version. Informs: #112629 Release note: None
- Loading branch information
1 parent
cdf9262
commit 123a2dc
Showing
3 changed files
with
41 additions
and
1 deletion.
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
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
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,31 @@ | ||
// Copyright 2023 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package logictestbase | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/cockroachdb/cockroach/pkg/clusterversion" | ||
) | ||
|
||
func TestLogicTestMixedVersionConfigs(t *testing.T) { | ||
// Verify there is a mixed-version config for each supported release. | ||
for _, v := range clusterversion.SupportedPreviousReleases() { | ||
t.Run(v.String(), func(t *testing.T) { | ||
for _, c := range LogicTestConfigs { | ||
if c.DisableUpgrade && c.BootstrapVersion == v { | ||
return | ||
} | ||
} | ||
t.Errorf("no mixed-version config for %v", v) | ||
}) | ||
} | ||
} |