prysm-pulse/beacon-chain/operations/slashings/service_test.go
Preston Van Loon 943dec525c
Refactor mock test helpers (#10133)
* Delete deploy contract tool. Move mock to its own package as testonly with some helper functions

* gofmt contracts/deposit/mock/mock.go

* move stategen mock.go to its on testonly pkg

* move password_reader_mock.go to mock testonly package

* move mock keymanager to its own testonly package

* move attestations mock

* move voluntaryexits mock

* Move slashings mock to mock pkg

* move the slasher mock

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-01-26 14:48:20 +00:00

22 lines
516 B
Go

package slashings
import (
"testing"
"github.com/prysmaticlabs/prysm/beacon-chain/operations/slashings/mock"
"github.com/prysmaticlabs/prysm/testing/require"
)
var (
_ = PoolManager(&Pool{})
_ = PoolInserter(&Pool{})
_ = PoolManager(&mock.PoolMock{})
_ = PoolInserter(&mock.PoolMock{})
)
func TestPool_validatorSlashingPreconditionCheck_requiresLock(t *testing.T) {
p := &Pool{}
_, err := p.validatorSlashingPreconditionCheck(nil, 0)
require.ErrorContains(t, "caller must hold read/write lock", err)
}