prysm-pulse/beacon-chain/sync/initial-sync/testing/mock.go
Radosław Kapka 9b3e1eb643
Implement GetHealth in the node API (#8217)
* Implement GetHealth in the node API

* repair fuzz mock

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-01-06 20:11:20 +00:00

30 lines
484 B
Go

// Package testing includes useful mocks for testing initial
// sync status in unit tests.
package testing
// Sync defines a mock for the sync service.
type Sync struct {
IsSyncing bool
IsInitialized bool
}
// Syncing --
func (s *Sync) Syncing() bool {
return s.IsSyncing
}
// Initialized --
func (s *Sync) Initialized() bool {
return s.IsInitialized
}
// Status --
func (s *Sync) Status() error {
return nil
}
// Resync --
func (s *Sync) Resync() error {
return nil
}