Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemadero committed Mar 21, 2022
1 parent a118286 commit 2460eea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"sync"
"time"

"github.com/ava-labs/avalanche-network-runner/local"
"github.com/ava-labs/avalanche-network-runner/pkg/color"
"github.com/ava-labs/avalanche-network-runner/pkg/logutil"
"github.com/ava-labs/avalanche-network-runner/rpcpb"
Expand Down Expand Up @@ -93,7 +94,7 @@ func (c *client) Ping(ctx context.Context) (*rpcpb.PingResponse, error) {
}

func (c *client) Start(ctx context.Context, execPath string, opts ...OpOption) (*rpcpb.StartResponse, error) {
ret := &Op{numNodes: local.defaultNumNodes}
ret := &Op{numNodes: local.DefaultNumNodes}
ret.applyOpts(opts)

zap.L().Info("start")
Expand Down
3 changes: 2 additions & 1 deletion cmd/avalanche-network-runner/control/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"time"

"github.com/ava-labs/avalanche-network-runner/client"
"github.com/ava-labs/avalanche-network-runner/local"
"github.com/ava-labs/avalanche-network-runner/pkg/color"
"github.com/ava-labs/avalanche-network-runner/pkg/logutil"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -74,7 +75,7 @@ func newStartCommand() *cobra.Command {
cmd.PersistentFlags().Uint32Var(
&numNodes,
"number-of-nodes",
local.defaultNumNodes,
local.DefaultNumNodes,
"number of nodes of the network",
)
cmd.PersistentFlags().StringVar(
Expand Down
4 changes: 2 additions & 2 deletions local/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
genesisFileName = "genesis.json"
stopTimeout = 30 * time.Second
healthCheckFreq = 3 * time.Second
defaultNumNodes = 5
DefaultNumNodes = 5
)

// interface compliance
Expand Down Expand Up @@ -101,7 +101,7 @@ func init() {

defaultNetworkConfig = network.Config{
Name: "my network",
NodeConfigs: make([]node.Config, defaultNumNodes),
NodeConfigs: make([]node.Config, DefaultNumNodes),
LogLevel: "INFO",
}

Expand Down
4 changes: 1 addition & 3 deletions tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import (
"github.com/onsi/gomega"
)

const numNodes = 5

func TestE2e(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "network-runner-example e2e test suites")
Expand Down Expand Up @@ -93,7 +91,7 @@ var _ = ginkgo.Describe("[Start/Remove/Restart/Stop]", func() {
ginkgo.It("can start", func() {
ginkgo.By("calling start API with the first binary", func() {
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
resp, err := cli.Start(ctx, execPath1, numNodes)
resp, err := cli.Start(ctx, execPath1)
cancel()
gomega.Ω(err).Should(gomega.BeNil())
color.Outf("{{green}}successfully started:{{/}} %+v\n", resp.ClusterInfo.NodeNames)
Expand Down

0 comments on commit 2460eea

Please sign in to comment.