testutil

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Configuration
	TestConfigPath string

	// Test Utils
	TestLogger *logrus.Logger

	// Test Prometheus factory
	TestFactory promauto.Factory
	TestHandler http.Handler

	// Test PostgresDB
	TestDB        *bun.DB
	TestIndexerDB common.IndexerDB
)

Functions

func BuildTestHandler

func BuildTestHandler(registry prometheus.Gatherer) http.Handler

func BuildTestMetricName

func BuildTestMetricName(namespace, subsystem, metricName string) string

func CheckMetricsWithParams

func CheckMetricsWithParams(
	checkMetric string,
	expectedMetricName, packageName, chainName string,
	additional ...string,
) (bool, string)

func GetTestExporter

func GetTestExporter() *common.Exporter

func SetupForTest

func SetupForTest() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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