mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 08:37:37 +00:00
4c47756aed
* remove validation package * structs cleanup * merge with apimiddleware removal * more validation and Bls capitalization * builder test fix * use strconv for uint->str conversions * use DecodeHexWithLength * use exact param names * rename http package to httputil * change conversions to fmt.Sprintf * handle query paramsd and route variables * spans and receiver name * split structs, move bytes helper * missing ok check * fix reference to indexed failure * errors fixup * add godoc to helper * fix BLS casing and chainhead ref * review * fix import in tests * gzl
17 lines
333 B
Go
17 lines
333 B
Go
package server
|
|
|
|
import (
|
|
"errors"
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/v4/testing/assert"
|
|
)
|
|
|
|
func TestDecodeError(t *testing.T) {
|
|
e := errors.New("not a number")
|
|
de := NewDecodeError(e, "Z")
|
|
de = NewDecodeError(de, "Y")
|
|
de = NewDecodeError(de, "X")
|
|
assert.Equal(t, "could not decode X.Y.Z: not a number", de.Error())
|
|
}
|