Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
98371: roachtest: fix clusterImpl.IsLocal() r=retry a=msbutler

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

Co-authored-by: Michael Butler <[email protected]>
  • Loading branch information
craig[bot] and msbutler committed Mar 11, 2023
2 parents 76e3eb2 + 8cb2803 commit 3b88952
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cmd/roachtest/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
"github.com/cockroachdb/cockroach/pkg/roachprod"
"github.com/cockroachdb/cockroach/pkg/roachprod/config"
"github.com/cockroachdb/cockroach/pkg/roachprod/install"
"github.com/cockroachdb/cockroach/pkg/roachprod/logger"
"github.com/cockroachdb/cockroach/pkg/roachprod/prometheus"
Expand Down Expand Up @@ -2382,8 +2383,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 config.IsLocalClusterName(c.name)
}

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

0 comments on commit 3b88952

Please sign in to comment.