test_helpers

package
v0.2.1-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2019 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertDoubleMapping

func AssertDoubleMapping(res DoubleMappingRes, blockNumber int, blockHash, keyOne, keyTwo, value string)

func AssertMapping

func AssertMapping(res MappingRes, blockNumber int, blockHash, key, value string)

func AssertVariable

func AssertVariable(res VariableRes, blockNumber int, blockHash, value string)

Types

type BlockMetadata

type BlockMetadata struct {
	BlockNumber int    `db:"block_number"`
	BlockHash   string `db:"block_hash"`
}

type DoubleMappingRes

type DoubleMappingRes struct {
	BlockMetadata
	KeyOne string `db:"key_one"`
	KeyTwo string `db:"key_two"`
	Value  string
}

type MappingRes

type MappingRes struct {
	BlockMetadata
	Key   string
	Value string
}

type MockMakerStorageRepository

type MockMakerStorageRepository struct {
	DaiKeys          []string
	GemKeys          []storage.Urn
	GetDaiKeysCalled bool
	GetDaiKeysError  error
	GetGemKeysCalled bool
	GetGemKeysError  error
	GetIlksCalled    bool
	GetIlksError     error
	GetMaxFlipCalled bool
	GetMaxFlipError  error
	GetSinKeysCalled bool
	GetSinKeysError  error
	GetUrnsCalled    bool
	GetUrnsError     error
	Ilks             []string
	MaxFlip          *big.Int
	SinKeys          []string
	Urns             []storage.Urn
}

func (*MockMakerStorageRepository) GetDaiKeys

func (repository *MockMakerStorageRepository) GetDaiKeys() ([]string, error)

func (*MockMakerStorageRepository) GetGemKeys

func (repository *MockMakerStorageRepository) GetGemKeys() ([]storage.Urn, error)

func (*MockMakerStorageRepository) GetIlks

func (repository *MockMakerStorageRepository) GetIlks() ([]string, error)

func (*MockMakerStorageRepository) GetMaxFlip

func (repository *MockMakerStorageRepository) GetMaxFlip() (*big.Int, error)

func (*MockMakerStorageRepository) GetSinKeys

func (repository *MockMakerStorageRepository) GetSinKeys() ([]string, error)

func (*MockMakerStorageRepository) GetUrns

func (repository *MockMakerStorageRepository) GetUrns() ([]storage.Urn, error)

func (*MockMakerStorageRepository) SetDB

func (repository *MockMakerStorageRepository) SetDB(db *postgres.DB)

type VariableRes

type VariableRes struct {
	BlockMetadata
	Value string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL