forked from cerc-io/ipld-eth-server
Consolidate test doubles
- Migrate various mocks of core namespaces to shared version in `fakes` pkg - Err on the side of making test doubles less sophisticated - Don't pull over mocks of namespaces that are only used in example code
This commit is contained in:
committed by
Ian Norden
parent
5fe6394406
commit
ba071ef13f
@@ -10,7 +10,7 @@ type Transformer interface {
|
||||
Execute() error
|
||||
}
|
||||
|
||||
type TransformerInitializer func(db *postgres.DB, blockchain core.Blockchain) Transformer
|
||||
type TransformerInitializer func(db *postgres.DB, blockchain core.BlockChain) Transformer
|
||||
|
||||
func HexToInt64(byteString string) int64 {
|
||||
value := common.HexToHash(byteString)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
type Watcher struct {
|
||||
Transformers []Transformer
|
||||
DB postgres.DB
|
||||
Blockchain core.Blockchain
|
||||
Blockchain core.BlockChain
|
||||
}
|
||||
|
||||
func (watcher *Watcher) AddTransformers(us []TransformerInitializer) {
|
||||
|
||||
@@ -23,7 +23,7 @@ func (mh *MockTransformer) Execute() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func fakeTransformerInitializer(db *postgres.DB, blockchain core.Blockchain) shared.Transformer {
|
||||
func fakeTransformerInitializer(db *postgres.DB, blockchain core.BlockChain) shared.Transformer {
|
||||
return &MockTransformer{}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user