testcommon

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigFile           = "config.ini"
	ConfigDirEnvVar      = "CONFIG_DIR"
	DefaultSection       = "DEFAULT"
	TimeoutSetupTeardown = 20

	// Default properties (or environment variable names)
	PropertyDebug             = "DEBUG"
	PropertyImageQPIDDispatch = "IMAGE_QDROUTERD"
	PropertyImageQDrOperator  = "IMAGE_QDROPERATOR"
)

Variables

This section is empty.

Functions

func Initialize

func Initialize(m *testing.M)

Initialize provides a common procedure for initializing shipshape as well as qdr-shipshape (ginkgo, command line flags and etc).

func RegisterFlags

func RegisterFlags()

func RunSpecs

func RunSpecs(t *testing.T, uniqueId string, description string)

RunSpecs will use Ginkgo to run your test specs, and eventually setup report dir accordingly. The uniqueId is used to help composing the generated JUnit file name (when --report-dir is specified when running your tests).

Types

type Config

type Config struct {
	Section string
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig(section string) *Config

func (*Config) GetEnvProperty

func (c *Config) GetEnvProperty(key string, defaultValue string) string

func (*Config) GetEnvPropertyBool

func (c *Config) GetEnvPropertyBool(key string, defaultValue bool) bool

func (*Config) GetEnvPropertyInt

func (c *Config) GetEnvPropertyInt(key string, defaultValue int) (int, error)

func (*Config) GetProperty

func (c *Config) GetProperty(section, key, defaultValue string) string

Jump to

Keyboard shortcuts

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