testrunner

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 29 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

View Source
const (
	RoutingAPIIP                    = "127.0.0.1"
	Host                            = "localhost"
	Postgres                        = "postgres"
	PostgresUsername                = "postgres"
	PostgresPassword                = ""
	PostgresPort                    = 5432
	MySQL                           = "mysql"
	MySQLUserName                   = "root"
	MySQLPassword                   = "password"
	MySQLPort                       = 3306
	SystemDomain                    = "example.com"
	MetricsReportingIntervalString  = "500ms"
	StatsdClientFlushIntervalString = "10ms"
	StatsdPort                      = 8125
)

Variables

View Source
var (
	Database     = os.Getenv("DB")
	MetronConfig = config.MetronConfig{
		Address: "1.2.3.4",
		Port:    "4567",
	}
)

Functions

func GetRoutingAPIConfig

func GetRoutingAPIConfig(testConfig RoutingAPITestConfig) *config.Config

func New

func New(binPath string, args Args) *ginkgomon.Runner

func RoutingAPISession

func RoutingAPISession(routingAPIBinPath string, args ...string) *gexec.Session

func RoutingApiClientWithPort

func RoutingApiClientWithPort(routingAPIPort uint16, routingAPIIP string) routingAPI.Client

func SetupOauthServer

func SetupOauthServer(uaaServerCert tls.Certificate) (*ghttp.Server, string)

func StartLocket

func StartLocket(
	locketPort uint16,
	locketBinPath string,
	databaseName string,
	caCert string,
	logConfig loggingclient.Config,
) ifrit.Process

func StopLocket

func StopLocket(locketProcess ifrit.Process)

func WriteConfigToTempFile

func WriteConfigToTempFile(conf *config.Config) string

Types

type Args

type Args struct {
	ConfigPath string
	DevMode    bool
	IP         string
}

func NewRoutingAPIArgs

func NewRoutingAPIArgs(
	ip string,
	port uint16,
	mtlsPort uint16,
	dbId string,
	dbCACert string,
	locketAddr string,
	mtlsClientCAPath string,
	mtlsServerCertPath string,
	mtlsServerKeyPath string,
) (Args, error)

func (Args) ArgSlice

func (args Args) ArgSlice() []string

func (Args) Port

func (args Args) Port() uint16

type DbAllocator

type DbAllocator interface {
	Create() (*config.SqlDB, error)
	Reset() error
	Delete() error
	// contains filtered or unexported methods
}

func NewDbAllocator

func NewDbAllocator() DbAllocator

func NewMySQLAllocator

func NewMySQLAllocator() DbAllocator

func NewPostgresAllocator

func NewPostgresAllocator() DbAllocator

type RoutingAPITestConfig

type RoutingAPITestConfig struct {
	Port                 uint16
	StatsdPort           uint16
	UAAPort              uint16
	AdminPort            uint16
	LocketConfig         locket.ClientLocketConfig
	CACertsPath          string
	Schema               string
	UseSQL               bool
	APIServerHTTPEnabled bool
	APIServerMTLSPort    uint16
	APIServerCertPath    string
	APIServerKeyPath     string
	APICAPath            string
}

func GetRoutingAPITestConfig

func GetRoutingAPITestConfig(
	routingAPIPort uint16,
	routingAPIAdminPort uint16,
	routingAPImTLSPort uint16,
	oAuthServerPort uint16,
	uaaCACertsPath string,
	databaseName string,
	mTLSAPIServerCertPath string,
	mTLSAPIServerKeyPath string,
	apiCAPath string,
	locketConfig locket.ClientLocketConfig,
) RoutingAPITestConfig

Jump to

Keyboard shortcuts

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