test_helpers

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FakeAddress = "0x0123456789abcdef000000000000000000000000"
	FakeIlk     = "0x464b450000000000000000000000000000000000000000000000000000000000"
)

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)

func CreateHeader added in v0.2.15

func CreateHeader(timestamp int64, blockNumber int, db *postgres.DB)

func FormatTimestamp added in v0.2.15

func FormatTimestamp(timestamp int64) string

Types

type AuctionVariableRes added in v0.2.9

type AuctionVariableRes struct {
	VariableRes
	ContractAddress string `db:"contract_address"`
}

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 FlapRes added in v0.2.11

type FlapRes struct {
	BlockMetadata
	ContractAddress string `db:"contract_address"`
	Id              string
	BidId           string `db:"bid_id"`
	Guy             string
	Tic             string
	End             string
	Lot             string
	Bid             string
}

type FlopRes added in v0.2.11

type FlopRes struct {
	BlockMetadata
	ContractAddress string `db:"contract_address"`
	Id              string
	BidId           string `db:"bid_id"`
	Guy             string
	Tic             string
	End             string
	Lot             string
	Bid             string
}

type MappingRes

type MappingRes struct {
	BlockMetadata
	Key   string
	Value string
}

type MockMakerStorageRepository

type MockMakerStorageRepository struct {
	Cdpis                   []string
	DaiKeys                 []string
	FlapBidIds              []string
	FlipBidIds              []string
	FlopBidIds              []string
	GemKeys                 []storage.Urn
	Ilks                    []string
	Owners                  []string
	SinKeys                 []string
	Urns                    []storage.Urn
	GetCdpisCalled          bool
	GetCdpisError           error
	GetDaiKeysCalled        bool
	GetDaiKeysError         error
	GetGemKeysCalled        bool
	GetGemKeysError         error
	GetFlapBidIdsCalled     bool
	GetFlapBidIdsError      error
	GetFlipBidIdsCalledWith string
	GetFlipBidIdsError      error
	GetFlopBidIdsCalledWith string
	GetFlopBidIdsError      error
	GetIlksCalled           bool
	GetIlksError            error
	GetOwnersCalled         bool
	GetOwnersError          error
	GetVatSinKeysCalled     bool
	GetVatSinKeysError      error
	GetVowSinKeysCalled     bool
	GetVowSinKeysError      error
	GetUrnsCalled           bool
	GetUrnsError            error
}

func (*MockMakerStorageRepository) GetCdpis added in v0.2.11

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

func (*MockMakerStorageRepository) GetDaiKeys

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

func (*MockMakerStorageRepository) GetFlapBidIds added in v0.2.9

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

func (*MockMakerStorageRepository) GetFlipBidIds added in v0.2.9

func (repository *MockMakerStorageRepository) GetFlipBidIds(contractAddress string) ([]string, error)

func (*MockMakerStorageRepository) GetFlopBidIds added in v0.2.9

func (repository *MockMakerStorageRepository) GetFlopBidIds(contractAddress string) ([]string, error)

func (*MockMakerStorageRepository) GetGemKeys

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

func (*MockMakerStorageRepository) GetIlks

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

func (*MockMakerStorageRepository) GetOwners added in v0.2.11

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

func (*MockMakerStorageRepository) GetUrns

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

func (*MockMakerStorageRepository) GetVatSinKeys added in v0.2.2

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

func (*MockMakerStorageRepository) GetVowSinKeys added in v0.2.2

func (repository *MockMakerStorageRepository) GetVowSinKeys() ([]string, 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