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>
This commit is contained in:
terence 2023-11-15 12:33:56 -08:00 committed by GitHub
parent 4c381938e1
commit 5ba91a5216
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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",

View File

@ -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