itest

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package itest contains unit tests targeting dependency injection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockFlavorRPC

func MockFlavorRPC() (*rpc.FlavorRPC, *mock.HTTPMock)

MockFlavorRPC initializes RPC flavor with HTTP mock

Types

type AgentT

type AgentT struct {
	// contains filtered or unexported fields
}

AgentT is similar to what testing.T is in golang packages.

func (*AgentT) Setup

func (t *AgentT) Setup(flavor core.Flavor, golangT *testing.T)

Setup registers gomega and starts the agent with the flavor argument

func (*AgentT) Teardown

func (t *AgentT) Teardown()

Teardown stops the agent

type AllConnectorsFlavorMocks added in v1.0.3

type AllConnectorsFlavorMocks struct {
	KafkaMock *kafkamux.KafkaMock
}

AllConnectorsFlavorMocks

func MockAllConnectorsFlavor added in v1.0.3

func MockAllConnectorsFlavor(t *testing.T, flavorLocal *local.FlavorLocal) (*connectors.AllConnectorsFlavor, *AllConnectorsFlavorMocks)

MockAllConnectororsFlavor initializes embeded ETCD & Kafka MOCK

Example:

kafkamock, _, _ := kafkamux.Mock(t)
MockAllConnectorsFlavor(t, localFlavor)

type Given

type Given struct {
}

Given is composition of multiple test step methods (see BDD Given keyword)

type Then

type Then struct {
}

Then is composition of multiple test step methods (see BDD Then keyword)

type When

type When struct {
}

When is composition of multiple test step methods (see BDD When keyword)

Jump to

Keyboard shortcuts

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