From 5ba91a5216b0747bc4ae3d0137a63c5fcb5fc32e Mon Sep 17 00:00:00 2001 From: terence Date: Wed, 15 Nov 2023 12:33:56 -0800 Subject: [PATCH] Add `construct_generic_block_test` to build file (#13195) * Add construct_generic_block_test test to build file * Use the right require library --------- Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> --- beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel | 1 + .../prysm/v1alpha1/validator/construct_generic_block_test.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel b/beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel index 8b68eba3233b..2af2ee5fc026 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel @@ -182,6 +182,7 @@ go_test( "assignments_test.go", "attester_test.go", "blocks_test.go", + "construct_generic_block_test.go", "exit_test.go", "proposer_altair_test.go", "proposer_attestations_test.go", diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/construct_generic_block_test.go b/beacon-chain/rpc/prysm/v1alpha1/validator/construct_generic_block_test.go index bc5815c93efa..793b2be661da 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/construct_generic_block_test.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/construct_generic_block_test.go @@ -5,8 +5,8 @@ import ( "github.com/prysmaticlabs/prysm/v4/consensus-types/blocks" ethpb "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v4/testing/require" "github.com/prysmaticlabs/prysm/v4/testing/util" - "github.com/stretchr/testify/require" ) func TestConstructGenericBeaconBlock(t *testing.T) { @@ -15,7 +15,7 @@ func TestConstructGenericBeaconBlock(t *testing.T) { // Test when sBlk or sBlk.Block() is nil t.Run("NilBlock", func(t *testing.T) { _, err := vs.constructGenericBeaconBlock(nil, nil, nil) - require.ErrorContains(t, err, "block cannot be nil") + require.ErrorContains(t, "block cannot be nil", err) }) // Test for Deneb version