Skip to content

Commit

Permalink
roachtest: fix clusterImpl.IsLocal()
Browse files Browse the repository at this point in the history
Previously, c.IsLocal() would always return false because local clusters
have a time based suffix. This patch changes c.IsLocal() to return true if the
cluster name is prefixed with "local".

Epic: none

Release note: none
  • Loading branch information
msbutler committed Mar 10, 2023
1 parent 01e14f6 commit 9ea2707
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/cmd/roachtest/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -2382,8 +2382,7 @@ func (c *clusterImpl) MakeNodes(opts ...option.Option) string {
}

func (c *clusterImpl) IsLocal() bool {
// FIXME: I think radu made local more flexible and local is a prefix?
return c.name == "local"
return strings.HasPrefix(c.name, "local")
}

func (c *clusterImpl) IsSecure() bool {
Expand Down

0 comments on commit 9ea2707

Please sign in to comment.