mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 20:07:17 +00:00
fecbec2342
* part1 * go tidy * Merge branch 'go-tidy' into apply-testutils-assertions-to-beaconchain-db * updated beacon-chain/db/kv tests * Merge branch 'master' into apply-testutils-assertions-to-beaconchain-db * Merge refs/heads/master into apply-testutils-assertions-to-beaconchain-db * Merge refs/heads/master into apply-testutils-assertions-to-beaconchain-db
18 lines
373 B
Go
18 lines
373 B
Go
package kv
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
testpb "github.com/prysmaticlabs/prysm/proto/testing"
|
|
"github.com/prysmaticlabs/prysm/shared/testutil/require"
|
|
)
|
|
|
|
func Test_encode_handlesNilFromFunction(t *testing.T) {
|
|
foo := func() *testpb.Puzzle {
|
|
return nil
|
|
}
|
|
_, err := encode(context.Background(), foo())
|
|
require.ErrorContains(t, "cannot encode nil message", err)
|
|
}
|