testsource

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConfig

func AddConfig(key string, value interface{})

AddConfig adds a new configuration

func CleanupTestSource

func CleanupTestSource()

CleanupTestSource cleans up every configuration

func NewTestSource

func NewTestSource(initConf map[string]interface{}) core.ConfigSource

NewTestSource is a function for creating new test source

func RemoveConfig

func RemoveConfig(key string, value interface{})

RemoveConfig removes a configuration

Types

type TestingSource

type TestingSource struct {
	Configuration map[string]interface{}

	sync.Mutex
	// contains filtered or unexported fields
}

TestingSource is a struct

func GetTestSource

func GetTestSource() *TestingSource

GetTestSource returns a test source object

func (*TestingSource) AddDimensionInfo

func (*TestingSource) AddDimensionInfo(dimensionInfo string) (map[string]string, error)

AddDimensionInfo adds dimension info for a test configuration

func (*TestingSource) Cleanup

func (test *TestingSource) Cleanup() error

Cleanup cleans a particular test configuration up

func (*TestingSource) DynamicConfigHandler

func (test *TestingSource) DynamicConfigHandler(callback core.DynamicConfigCallback) error

DynamicConfigHandler dynamically handles a test configuration

func (*TestingSource) GetConfigurationByKey

func (test *TestingSource) GetConfigurationByKey(key string) (interface{}, error)

GetConfigurationByKey gets required test configuration for a particular key

func (*TestingSource) GetConfigurationByKeyAndDimensionInfo

func (*TestingSource) GetConfigurationByKeyAndDimensionInfo(key, di string) (interface{}, error)

GetConfigurationByKeyAndDimensionInfo gets a required test configuration for particular key and dimension info pair

func (*TestingSource) GetConfigurations

func (test *TestingSource) GetConfigurations() (map[string]interface{}, error)

GetConfigurations gets all test configurations

func (TestingSource) GetConfigurationsByDI

func (TestingSource) GetConfigurationsByDI(dimensionInfo string) (map[string]interface{}, error)

GetConfigurationsByDI gets required test configuration for a particular dimension info

func (*TestingSource) GetPriority

func (test *TestingSource) GetPriority() int

GetPriority returns priority of the test configuration

func (*TestingSource) GetSourceName

func (*TestingSource) GetSourceName() string

GetSourceName returns name of test configuration

func (*TestingSource) SetPriority added in v0.13.0

func (test *TestingSource) SetPriority(priority int)

SetPriority custom priority

Jump to

Keyboard shortcuts

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