From 42908d0b753a5ace379232246eef5bad43a17662 Mon Sep 17 00:00:00 2001 From: Timothy Wu Date: Thu, 25 Nov 2021 16:25:47 -0500 Subject: [PATCH] fix(dot): fix `TestNewNode` (#2070) * set babelead=true * fix lint --- devnet/cmd/update-dd-agent-confd/main.go | 2 +- dot/node_test.go | 1 + lib/grandpa/grandpa_test.go | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/devnet/cmd/update-dd-agent-confd/main.go b/devnet/cmd/update-dd-agent-confd/main.go index 0bfb76b9f9..39bed49b20 100644 --- a/devnet/cmd/update-dd-agent-confd/main.go +++ b/devnet/cmd/update-dd-agent-confd/main.go @@ -14,7 +14,7 @@ import ( ) type options struct { - Namespace string `short:"n" long:"namespace" description:"namespace that is prepended to all metrics" required:"true"` + Namespace string `short:"n" long:"namespace" description:"namespace that is prepended to all metrics" required:"true"` //nolint:lll Tags []string `short:"t" long:"tags" description:"tags that are added to all metrics"` } diff --git a/dot/node_test.go b/dot/node_test.go index 11293601cb..1d589486a9 100644 --- a/dot/node_test.go +++ b/dot/node_test.go @@ -153,6 +153,7 @@ func TestStartNode(t *testing.T) { cfg.Init.Genesis = genFile.Name() cfg.Core.GrandpaAuthority = false + cfg.Core.BABELead = true err := InitNode(cfg) require.NoError(t, err) diff --git a/lib/grandpa/grandpa_test.go b/lib/grandpa/grandpa_test.go index f4a3a44540..01d3c3f9c6 100644 --- a/lib/grandpa/grandpa_test.go +++ b/lib/grandpa/grandpa_test.go @@ -1388,7 +1388,11 @@ func addBlocksToState(t *testing.T, blockState *state.BlockState, depth int) { } } -func addBlocksAndReturnTheLastOne(t *testing.T, blockState *state.BlockState, depth int, lastBlockArrivalTime time.Time) *types.Block { +func addBlocksAndReturnTheLastOne( + t *testing.T, blockState *state.BlockState, + depth int, + lastBlockArrivalTime time.Time, +) *types.Block { t.Helper() addBlocksToState(t, blockState, depth)