Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFreePort ¶
GetFreePort asks the kernel for a free open port that is ready to use for tests.
func StderrOutputForFunc ¶
func StderrOutputForFunc(f func()) string
func StdoutOutputForFunc ¶
func StdoutOutputForFunc(f func()) string
Types ¶
type CustomError ¶
type CustomError struct {
ErrorMessage string
}
func (CustomError) Error ¶
func (c CustomError) Error() string
type ServiceConfigs ¶
type ServiceConfigs struct {
HTTPPort int
HTTPHost string
MetricsPort int
MetricsHost string
GRPCPort int
GRPCHost string
}
ServiceConfigs holds the configuration details for different server components.
func NewServerConfigs ¶
func NewServerConfigs(t *testing.T) *ServiceConfigs
NewServerConfigs sets up server configurations for testing and returns a ServiceConfigs struct. It dynamically assigns free ports for HTTP, Metrics, and gRPC services, sets up environment variables for them, and returns a struct with the configured values.
func (*ServiceConfigs) Get ¶
func (*ServiceConfigs) Get(string) string
Get implements config.Config.
func (*ServiceConfigs) GetOrDefault ¶
func (*ServiceConfigs) GetOrDefault(string, string) string
GetOrDefault implements config.Config.
Click to show internal directories.
Click to hide internal directories.