Documentation
¶
Overview ¶
Package tests is a collection of beacon implementation test cases.
Index ¶
- Variables
- func BeaconImplementationTests(t *testing.T, consensus consensusAPI.Service)
- func EpochtimeSetableImplementationTest(t *testing.T, consensus consensusAPI.Service)
- func MustAdvanceEpoch(t *testing.T, consensus consensusAPI.Service) api.EpochTime
- func MustAdvanceEpochMulti(t *testing.T, consensus consensusAPI.Service, increment uint64) api.EpochTime
- func SetEpoch(ctx context.Context, epoch api.EpochTime, consensus consensusAPI.Service) error
Constants ¶
This section is empty.
Variables ¶
var TestSigner = memorySigner.NewTestSigner("oasis-core epochtime mock key seed")
TestSigner is a test signer used for setting epochs in tests.
Functions ¶
func BeaconImplementationTests ¶
func BeaconImplementationTests(t *testing.T, consensus consensusAPI.Service)
BeaconImplementationTests exercises the basic functionality of a beacon backend.
func EpochtimeSetableImplementationTest ¶ added in v0.2100.0
func EpochtimeSetableImplementationTest(t *testing.T, consensus consensusAPI.Service)
EpochtimeSetableImplementationTest exercises the basic functionality of a setable (mock) epochtime backend.
func MustAdvanceEpoch ¶ added in v0.2100.0
MustAdvanceEpoch advances the epoch and returns the new epoch.
func MustAdvanceEpochMulti ¶ added in v0.2103.0
func MustAdvanceEpochMulti(t *testing.T, consensus consensusAPI.Service, increment uint64) api.EpochTime
MustAdvanceEpochMulti advances the epoch by the specified increment, and returns the new epoch. Between each epoch increment the method ensures that the consensus validator is re-registered so that epochs are not advanced too fast, which could cause a consensus error due to no validators being registered for the epoch.
Types ¶
This section is empty.