Documentation ¶
Index ¶
- Variables
- func GetTLSCertPath() string
- func GetTLSKeyPath() string
- func Run(t *testing.T, i interface{})
- type FTPSettings
- type Initable
- type MysqlSettings
- type PubSubSettings
- type RedisSettings
- type RuntimeType
- type Settings
- type SutSettings
- type TLSSettings
- type TestEnviorment
- func (env *TestEnviorment) Prepare(cli *docker.Docker) error
- func (env *TestEnviorment) Run()
- func (env *TestEnviorment) Start(ctx context.Context) error
- func (env *TestEnviorment) StartSutInCommandMode() error
- func (env *TestEnviorment) Stop(ctx context.Context) error
- func (env *TestEnviorment) StopSutInCommandMode(tcName string) error
- func (env *TestEnviorment) WithFTP(settings FTPSettings) *TestEnviorment
- func (env *TestEnviorment) WithMySQL(settings MysqlSettings) *TestEnviorment
- func (env *TestEnviorment) WithPubSub(settings PubSubSettings) *TestEnviorment
- func (env *TestEnviorment) WithRedis(settings RedisSettings) *TestEnviorment
- func (env *TestEnviorment) WithSUT(settings SutSettings) *TestEnviorment
- func (env *TestEnviorment) WithTLS(settings TLSSettings) *TestEnviorment
- func (env *TestEnviorment) WriteComponentLogs(ctx context.Context, cpnt component.Component, prefix string) error
- func (env *TestEnviorment) WriteLogs(ctx context.Context, tcName string) error
- type TopicSubscriptions
Constants ¶
This section is empty.
Variables ¶
View Source
var (
GetDockerHostAddr = docker.HostAddr
)
Functions ¶
func GetTLSCertPath ¶
func GetTLSCertPath() string
func GetTLSKeyPath ¶
func GetTLSKeyPath() string
Types ¶
type FTPSettings ¶
type MysqlSettings ¶
type PubSubSettings ¶
type PubSubSettings struct { ProjectID string TopicSubscriptions []TopicSubscriptions }
type RedisSettings ¶
type RuntimeType ¶
type RuntimeType int
RuntimeType distinguish between different ways of sut execution.
const ( // RuntimeTypeService indicates that system under test works as a service. RuntimeTypeService RuntimeType = iota // RuntimeTypeCommand indicates that system under test is a simble binary that will // terminate after execution. RuntimeTypeCommand )
type Settings ¶
type Settings struct { MySQL *MysqlSettings SUT *SutSettings PubSub *PubSubSettings Redis *RedisSettings FTP *FTPSettings TLS *TLSSettings }
type SutSettings ¶
type SutSettings struct { // Envs allows to pass custom env to system under test container. Envs []string // Dir is a path to directory that collect system under test source for which binary shuld be build. Dir string // Ports is a collection of ports that sut binary require, those ports will be forwarded to local host with the // same port mapping. Ports []int // RuntimeType Type of system under test runtime. In case of service runtime sut component will // be executed once, but when runtime type is set to command (terminates after execution) sut component // needs to be re-executed for each testcase. RuntimeType RuntimeType }
SutSettings system under test settings used to build and executed sut in docker container.
type TLSSettings ¶
type TLSSettings struct { // Host is a list of DSName or IP that will be added as a Subject Alternative Names. Hosts []string }
TLSSettings allows to pass additional that will be used during generation certs.
type TestEnviorment ¶
type TestEnviorment struct { SUT component.Component M *testing.M // contains filtered or unexported fields }
func TestEnv ¶
func TestEnv(m *testing.M) *TestEnviorment
func (*TestEnviorment) Run ¶
func (env *TestEnviorment) Run()
func (*TestEnviorment) StartSutInCommandMode ¶
func (env *TestEnviorment) StartSutInCommandMode() error
func (*TestEnviorment) StopSutInCommandMode ¶
func (env *TestEnviorment) StopSutInCommandMode(tcName string) error
func (*TestEnviorment) WithFTP ¶
func (env *TestEnviorment) WithFTP(settings FTPSettings) *TestEnviorment
func (*TestEnviorment) WithMySQL ¶
func (env *TestEnviorment) WithMySQL(settings MysqlSettings) *TestEnviorment
func (*TestEnviorment) WithPubSub ¶
func (env *TestEnviorment) WithPubSub(settings PubSubSettings) *TestEnviorment
func (*TestEnviorment) WithRedis ¶
func (env *TestEnviorment) WithRedis(settings RedisSettings) *TestEnviorment
func (*TestEnviorment) WithSUT ¶
func (env *TestEnviorment) WithSUT(settings SutSettings) *TestEnviorment
func (*TestEnviorment) WithTLS ¶
func (env *TestEnviorment) WithTLS(settings TLSSettings) *TestEnviorment
func (*TestEnviorment) WriteComponentLogs ¶
type TopicSubscriptions ¶
Click to show internal directories.
Click to hide internal directories.