itest

package
v0.0.0-...-d0f0867 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2017 License: Apache-2.0 Imports: 12 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

type AllConnectorsFlavorMocks struct {
	KafkaMock *kafkamux.KafkaMock
}

AllConnectorsFlavorMocks is container for mocks for AllConnectorsFlavor

func MockAllConnectorsFlavor

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

MockAllConnectorsFlavor 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