Version: v1.3.1 Latest Latest

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

Go to latest
Published: Jun 3, 2019 License: MIT Imports: 17 Imported by: 0



Package test is an internal package to handle common test setup



This section is empty.


This section is empty.


func MustGetEnv added in v1.1.0

func MustGetEnv(key string) string

MustGetEnv will panic or return the env var for a given string key

func RandomString added in v0.2.0

func RandomString(prefix string, length int) string

RandomString generates a random string with prefix


type BaseSuite

type BaseSuite struct {
	SubscriptionID    string
	Namespace         string
	ResourceGroupName string
	Location          string
	Env               azure.Environment
	TagID             string
	// contains filtered or unexported fields

BaseSuite encapsulates a end to end test of Event Hubs with build up and tear down of all EH resources

func (*BaseSuite) DeleteEventHub

func (suite *BaseSuite) DeleteEventHub(name string)

DeleteEventHub deletes an Event Hub within the given Namespace

func (*BaseSuite) RandomHub added in v0.4.0

func (suite *BaseSuite) RandomHub(opts ...HubMgmtOption) (*mgmt.Model, func())

RandomHub creates a hub with a random'ish name

func (*BaseSuite) RandomName added in v0.2.0

func (suite *BaseSuite) RandomName(prefix string, length int) string

RandomName generates a random Event Hub name tagged with the suite id

func (*BaseSuite) SetupSuite

func (suite *BaseSuite) SetupSuite()

SetupSuite constructs the test suite from the environment and

func (*BaseSuite) TearDownSuite

func (suite *BaseSuite) TearDownSuite()

TearDownSuite might one day destroy all of the resources in the suite, but I'm not sure we want to do that just yet...

type HubMgmtOption

type HubMgmtOption func(model *mgmt.Model) error

HubMgmtOption represents an option for configuring an Event Hub.

type NamespaceMgmtOption

type NamespaceMgmtOption func(ns *mgmt.EHNamespace) error

NamespaceMgmtOption represents an option for configuring a Namespace

Source Files

Jump to

Keyboard shortcuts

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