Skip to content

Commit

Permalink
Minor changes from self review
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Dec 29, 2024
1 parent 85c87ff commit 61cd151
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions go/test/endtoend/vreplication/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,6 @@ func isEmptyWorkflowShowOutput(output string) bool {
"workflows": []
}`
)

return strings.TrimSpace(output) == emptyJSON || strings.TrimSpace(output) == emptyNonCompactWorkflowShowResponse
v := strings.TrimSpace(output)
return v == emptyJSON || v == emptyNonCompactWorkflowShowResponse
}
2 changes: 1 addition & 1 deletion go/test/endtoend/vreplication/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func insertInitialDataIntoExternalCluster(t *testing.T, conn *mysql.Conn) {
})
}

// TestMigrate runs an e2e test for importing from an external cluster using the vtctld Mount and Migrate commands.
// TestMigrate runs an e2e test for importing from an external cluster using the vtctldclient Mount and Migrate commands.
// We have an anti-pattern in Vitess: vt executables look for an environment variable VTDATAROOT for certain cluster parameters
// like the log directory when they are created. Until this test we just needed a single cluster for e2e tests.
// However now we need to create an external Vitess cluster. For this we need a different VTDATAROOT and
Expand Down
4 changes: 1 addition & 3 deletions go/test/endtoend/vreplication/vreplication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1168,11 +1168,9 @@ func shardMerchant(t *testing.T) {
}

func materialize(t *testing.T, spec string) {
t.Run("vtctldclient materialize", func(t *testing.T) {
t.Run("materialize", func(t *testing.T) {
// Split out the parameters from the JSON spec for
// use in the vtctldclient command flags.
// This allows us to test both clients with the same
// input.
sj := gjson.Parse(spec)
workflow := sj.Get("workflow").String()
require.NotEmpty(t, workflow, "workflow not found in spec: %s", spec)
Expand Down

0 comments on commit 61cd151

Please sign in to comment.