Skip to content

Commit

Permalink
fix: disambiguate CometLocalWebsocketURL & CometLocalTCPURL
Browse files Browse the repository at this point in the history
(cherry picked from commit 358cb0ae8ffed76a75d83f42ef0a4ea94d185189)
  • Loading branch information
bryanchriswhite committed Dec 6, 2023
1 parent b176b7a commit e58cd33
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions testutil/testclient/localnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@ import (
"github.com/pokt-network/poktroll/cmd/pocketd/cmd"
)

// CometLocalWebsocketURL provides a default URL pointing to the localnet websocket endpoint.
//
// TODO_IMPROVE: It would be nice if the value could be set correctly based
// on whether the test using it is running in tilt or not.
const CometLocalWebsocketURL = "ws://sequencer-poktroll-sequencer:36657/websocket"
const (
// CometLocalTCPURL provides a default URL pointing to the localnet TCP endpoint.
//
// TODO_IMPROVE: It would be nice if the value could be set correctly based
// on whether the test using it is running in tilt or not.
CometLocalTCPURL = "tcp://sequencer-poktroll-sequencer:36657"

// CometLocalWebsocketURL provides a default URL pointing to the localnet websocket endpoint.
//
// TODO_IMPROVE: It would be nice if the value could be set correctly based
// on whether the test using it is running in tilt or not.
CometLocalWebsocketURL = "ws://sequencer-poktroll-sequencer:36657/websocket"
)

// EncodingConfig encapsulates encoding configurations for the Pocket application.
var EncodingConfig = app.MakeEncodingConfig()
Expand Down Expand Up @@ -67,7 +75,7 @@ func NewLocalnetFlagSet(t gocuke.TestingT) *pflag.FlagSet {
mockFlagSet := pflag.NewFlagSet("test", pflag.ContinueOnError)
// TODO_IMPROVE: It would be nice if the value could be set correctly based
// on whether the test using it is running in tilt or not.
mockFlagSet.String(flags.FlagNode, CometLocalWebsocketURL, "use localnet poktrolld node")
mockFlagSet.String(flags.FlagNode, CometLocalTCPURL, "use localnet poktrolld node")
mockFlagSet.String(flags.FlagHome, "", "use localnet poktrolld node")
mockFlagSet.String(flags.FlagKeyringBackend, "test", "use test keyring")
err := mockFlagSet.Parse([]string{})
Expand Down

0 comments on commit e58cd33

Please sign in to comment.