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

logictest: add test for mixed-version configs #114309

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

RaduBerinde
Copy link
Member

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

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@andyyang890 andyyang890 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @celiala and @RaduBerinde)


pkg/sql/logictest/logictestbase/logictestbase_test.go line 19 at r1 (raw file):

)

func TestLogicTestConfigs(t *testing.T) {

Do we maybe want to name this test something like TestLogicTestConfigsHasMixedVersionConfigs? Or alternatively put this into a subtest with t.Run("verify there is a mixed-version config for each supported release", ...)?


pkg/sql/logictest/logictestbase/logictestbase_test.go line 24 at r1 (raw file):

		found := false
		for _, c := range LogicTestConfigs {
			if c.BootstrapVersion == v {

It might be useful to also check that c.DisableUpgrade == true.

@andyyang890 andyyang890 requested a review from rafiss November 13, 2023 18:56
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: cockroachdb#112629
Release note: None
Copy link
Member Author

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTR!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andyyang890, @celiala, and @rafiss)


pkg/sql/logictest/logictestbase/logictestbase_test.go line 19 at r1 (raw file):

Previously, andyyang890 (Andy Yang) wrote…

Do we maybe want to name this test something like TestLogicTestConfigsHasMixedVersionConfigs? Or alternatively put this into a subtest with t.Run("verify there is a mixed-version config for each supported release", ...)?

Good point, renamed to TestLogicTestMixedVersionConfigs

Copy link
Collaborator

@andyyang890 andyyang890 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! :lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @celiala and @rafiss)

Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a great check to add, thanks

@RaduBerinde
Copy link
Member Author

TFTRs!

bors r+

@craig
Copy link
Contributor

craig bot commented Nov 13, 2023

Build succeeded:

@craig craig bot merged commit f9e21c4 into cockroachdb:master Nov 13, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants