mercury_common_test

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RelayArgs = types.RelayArgs{
		ExternalJobID: uuid.MustParse("f1928153-d0b4-474b-9fd7-fd0985d0e7ca"),
		JobID:         42,
		ContractID:    "mercury-testcontract",
		New:           true,
		RelayConfig:   []byte{1: 4, 36: 101},
		ProviderType:  string(types.Mercury),
	}
	PluginArgs = types.PluginArgs{
		TransmitterID: "mercury-testtransmitter",
		PluginConfig:  []byte{133: 79},
	}
)
View Source
var ChainReader = staticMercuryChainReader{
	// contains filtered or unexported fields
}
View Source
var FactoryServer = staticMercuryServer{
	// contains filtered or unexported fields
}
View Source
var MercuryProvider = staticMercuryProvider{
	// contains filtered or unexported fields
}
View Source
var OCR3Plugin = staticMercuryPlugin{
	// contains filtered or unexported fields
}

MercuryPlugin is a test helper for testing ocr3types.MercuryPlugin implementations. the name is adopted because ocr3 has a special mercury plugin type

View Source
var OnchainConfigCodec = staticOnchainConfigCodec{
	// contains filtered or unexported fields
}

OnchainConfigCodec is a static implementation of OnchainConfigCodec for testing

View Source
var ServerFetcher = staticServerFetcher{}
View Source
var StaticOnChainConfigCodecFixtures = onChainConfigCodecParameters{
	Encoded: []byte("on chain config to be encoded"),
	Decoded: mercury_types.OnchainConfig{
		Min: big.NewInt(1),
		Max: big.NewInt(100),
	},
}
View Source
var StaticServerFetcherFixtures = StaticServerFetcherValues{
	InitialMaxFinalizedBlockNumber: 10,
	LatestPrice:                    big.NewInt(100),
	LatestTimestamp:                7,
}

Functions

func MercuryPluginFactory

func MercuryPluginFactory(t *testing.T, factory types.MercuryPluginFactory)

func PluginMercury

func PluginMercury(t *testing.T, p types.PluginMercury)

Types

type ErrExpected

type ErrExpected struct {
	Expected, Got interface{}
}

func (*ErrExpected) Error

func (e *ErrExpected) Error() string

type MercuryProviderTester

type MercuryProviderTester interface {
	types.MercuryProvider
	AssertEqual(ctx context.Context, t *testing.T, other types.MercuryProvider)
}

type PluginMercuryTest

type PluginMercuryTest struct {
	types.MercuryProvider
}

func (PluginMercuryTest) TestPluginMercury

func (m PluginMercuryTest) TestPluginMercury(t *testing.T, p types.PluginMercury)

type StaticServerFetcherValues

type StaticServerFetcherValues struct {
	InitialMaxFinalizedBlockNumber int64
	LatestPrice                    *big.Int
	LatestTimestamp                int64
}

Jump to

Keyboard shortcuts

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