Skip to content

Commit

Permalink
roachtest: primitive dry-run mode for mixedversion tests
Browse files Browse the repository at this point in the history
If `MVT_DRY_RUN_MODE` env. var. is set, print
the mixedversion test plan and exit.

Epic: none

Release note: None
  • Loading branch information
srosenberg committed Dec 24, 2024
1 parent d58f071 commit 12b2274
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/cmd/roachtest/roachtestutil/mixedversion/mixedversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ const (
// - MVT_UPGRADE_PATH=24.1.5,24.2.0,current
// - MVT_UPGRADE_PATH=24.1,24.2,current
upgradePathOverrideEnv = "MVT_UPGRADE_PATH"

// Dump the test plan and return, i.e., skipping the actual execution of the test.
dryRunEnv = "MVT_DRY_RUN"
)

var (
Expand Down Expand Up @@ -774,6 +777,11 @@ func (t *Test) Run() {

t.logger.Printf("mixed-version test:\n%s", plan.PrettyPrint())

if override := os.Getenv(dryRunEnv); override != "" {
t.logger.Printf("skipping test run in dry-run mode")
return
}

// Mark the deployment mode and versions, so they show up in the github issue. This makes
// it easier to group failures together without having to dig into the test logs.
t.rt.AddParam("mvtDeploymentMode", string(plan.deploymentMode))
Expand Down

0 comments on commit 12b2274

Please sign in to comment.