mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-21 19:20:39 +00:00
Added coverage checker for caplin packages (#7609)
This commit is contained in:
parent
0dc8e271a9
commit
c0042d570c
15
cl/coverage
Normal file
15
cl/coverage
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
SKIP_TESTS=(
|
||||
"github.com\/ledgerwatch\/erigon\/cl\/beacon"
|
||||
"github.com\/ledgerwatch\/erigon\/cl\/phase1"
|
||||
"github.com\/ledgerwatch\/erigon\/cl\/phase1\/core"
|
||||
"github.com\/ledgerwatch\/erigon\/cl\/phase1\/network"
|
||||
"github.com\/ledgerwatch\/erigon\/cl\/phase1\/stages"
|
||||
"github.com\/ledgerwatch\/erigon\/cl\/rpc"
|
||||
"github.com\/ledgerwatch\/erigon\/cl\/spectest\/consensus_tests"
|
||||
)
|
||||
|
||||
FLAGS=$(printf " -e /%s\\\t/d" "${SKIP_TESTS[@]}")
|
||||
|
||||
go test ./... --cover | sed ${FLAGS}
|
18
cl/phase1/cache/cache_test.go
vendored
Normal file
18
cl/phase1/cache/cache_test.go
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
package cache_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/ledgerwatch/erigon/cl/cltypes/solid"
|
||||
"github.com/ledgerwatch/erigon/cl/phase1/cache"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestAttestationsCache(t *testing.T) {
|
||||
input := []uint64{1}
|
||||
a := &solid.AttestationData{}
|
||||
cache.StoreAttestation(a, []uint64{1})
|
||||
output, valid := cache.LoadAttestatingIndicies(a)
|
||||
require.True(t, valid)
|
||||
require.Equal(t, input, output)
|
||||
}
|
Loading…
Reference in New Issue
Block a user