Skip to content

Commit

Permalink
Add construct_generic_block_test to build file (#13195)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
terencechain and prylabs-bulldozer[bot] committed Nov 15, 2023
1 parent 4c38193 commit 5ba91a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down

0 comments on commit 5ba91a5

Please sign in to comment.