Documentation ¶
Index ¶
- Constants
- func RandomString(prefix string, length int) string
- type BaseSuite
- func (suite *BaseSuite) DeleteEventHub(ctx context.Context, name string) error
- func (suite *BaseSuite) EnsureEventHub(ctx context.Context, name string, opts ...HubMgmtOption) (*mgmt.Model, error)
- func (suite *BaseSuite) RandomName(prefix string, length int) string
- func (suite *BaseSuite) SetupSuite()
- func (suite *BaseSuite) TearDownSuite()
- type HubMgmtOption
- type NamespaceMgmtOption
Constants ¶
const ( // Location is the Azure geographic location the test suite will use for provisioning Location = "eastus" // ResourceGroupName is the name of the resource group the test suite will use for provisioning ResourceGroupName = "ehtest" )
Variables ¶
This section is empty.
Functions ¶
func RandomString ¶ added in v0.2.0
RandomString generates a random string with prefix
Types ¶
type BaseSuite ¶
type BaseSuite struct { suite.Suite SubscriptionID string Namespace 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 ¶
DeleteEventHub deletes an Event Hub within the given Namespace
func (*BaseSuite) EnsureEventHub ¶
func (suite *BaseSuite) EnsureEventHub(ctx context.Context, name string, opts ...HubMgmtOption) (*mgmt.Model, error)
EnsureEventHub creates an Event Hub if it doesn't exist
func (*BaseSuite) RandomName ¶ added in v0.2.0
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 ¶
HubMgmtOption represents an option for configuring an Event Hub.
func HubWithPartitions ¶
func HubWithPartitions(count int) HubMgmtOption
HubWithPartitions configures an Event Hub to have a specific number of partitions.
Must be between 1 and 32
type NamespaceMgmtOption ¶
type NamespaceMgmtOption func(ns *mgmt.EHNamespace) error
NamespaceMgmtOption represents an option for configuring a Namespace