test

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValueFromCnOrLogFatalWithTimeout

func GetValueFromCnOrLogFatalWithTimeout[T any](cn <-chan T, timeout time.Duration, errorMsg string) T

func RunInTransaction

func RunInTransaction(t *testing.T, db *pgxpool.Pool, testFunc func(*testing.T, pgx.Tx))

func SpinUpPostgresContainer

func SpinUpPostgresContainer(pathToMigration string) (testcontainers.Container, func(ctx context.Context), error)

func SpinUpPostgresContainerAndGetPgxpool

func SpinUpPostgresContainerAndGetPgxpool(pathToMigration string) (*pgxpool.Pool, testcontainers.Container, func(ctx context.Context))

Types

type MockXMRDaemonRpcClient

type MockXMRDaemonRpcClient struct {
	mock.Mock
}

func (*MockXMRDaemonRpcClient) GetBlockByHash

func (m *MockXMRDaemonRpcClient) GetBlockByHash(fillPowHash bool, hash string) (*daemon.JsonRpcGenericResponse[daemon.GetBlockResult], error)

func (*MockXMRDaemonRpcClient) GetBlockByHeight

func (m *MockXMRDaemonRpcClient) GetBlockByHeight(includeHex bool, height uint64) (*daemon.JsonRpcGenericResponse[daemon.GetBlockResult], error)

func (*MockXMRDaemonRpcClient) GetBlockCount

func (*MockXMRDaemonRpcClient) GetBlockHeaderByHash

func (m *MockXMRDaemonRpcClient) GetBlockHeaderByHash(fillPowHash bool, hash string) (*daemon.JsonRpcGenericResponse[daemon.GetBlockHeaderResult], error)

func (*MockXMRDaemonRpcClient) GetBlockHeaderByHeight

func (m *MockXMRDaemonRpcClient) GetBlockHeaderByHeight(fillPowHash bool, height uint64) (*daemon.JsonRpcGenericResponse[daemon.GetBlockHeaderResult], error)

func (*MockXMRDaemonRpcClient) GetBlockHeadersRange

func (m *MockXMRDaemonRpcClient) GetBlockHeadersRange(fillPowHash bool, startHeight uint64, endHeight uint64) (*daemon.JsonRpcGenericResponse[daemon.GetBlockHeadersRangeResult], error)

func (*MockXMRDaemonRpcClient) GetBlockTemplate

func (*MockXMRDaemonRpcClient) GetCurrentHeight

func (m *MockXMRDaemonRpcClient) GetCurrentHeight() (*daemon.GetHeightResponse, error)

func (*MockXMRDaemonRpcClient) GetFeeEstimate

func (*MockXMRDaemonRpcClient) GetInfo

func (*MockXMRDaemonRpcClient) GetLastBlockHeader

func (*MockXMRDaemonRpcClient) GetTransactionPool

func (m *MockXMRDaemonRpcClient) GetTransactionPool() (*daemon.GetTransactionPoolResponse, error)

func (*MockXMRDaemonRpcClient) GetTransactions

func (m *MockXMRDaemonRpcClient) GetTransactions(txHashes []string, decodeAsJson bool, prune bool, split bool) (*daemon.GetTransactionsResponse, error)

func (*MockXMRDaemonRpcClient) GetVersion

func (*MockXMRDaemonRpcClient) OnGetBlockHash

func (*MockXMRDaemonRpcClient) SetRpcConnection

func (m *MockXMRDaemonRpcClient) SetRpcConnection(connection *daemon.RpcConnection)

func (*MockXMRDaemonRpcClient) SubmitBlock

Jump to

Keyboard shortcuts

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