testing

package
v0.0.0-...-4b7ff4e Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeHyperscalerProvider

func NewFakeHyperscalerProvider(client azure.Interface) azure.HyperscalerProvider

func NewFakeHyperscalerProviderError

func NewFakeHyperscalerProviderError() azure.HyperscalerProvider

func NewFakeNamespaceAccessKeysNil

func NewFakeNamespaceAccessKeysNil() azure.Interface

func NewFakeNamespaceClientCreationError

func NewFakeNamespaceClientCreationError() azure.Interface

func NewFakeNamespaceClientListError

func NewFakeNamespaceClientListError() azure.Interface

func NewFakeNamespaceResourceGroupError

func NewFakeNamespaceResourceGroupError() azure.Interface

Types

type FakeHyperscalerProvider

type FakeHyperscalerProvider struct {
	Client azure.Interface
	Err    error
}

func (*FakeHyperscalerProvider) GetClient

func (ac *FakeHyperscalerProvider) GetClient(config *azure.Config, logger logrus.FieldLogger) (azure.Interface, error)

type FakeNamespaceClient

type FakeNamespaceClient struct {
	PersistEventhubsNamespaceError error
	ResourceGroupError             error
	AccessKeysError                error
	AccessKeys                     *eventhub.AccessKeys
	Tags                           azure.Tags
	GetResourceGroupError          error
	GetResourceGroupReturnValue    resources.Group
	DeleteResourceGroupCalled      bool
	DeleteResourceGroupError       error
}

/ A fake Client for Azure EventHubs Namespace handling

func NewFakeNamespaceClientHappyPath

func NewFakeNamespaceClientHappyPath() *FakeNamespaceClient

func NewFakeNamespaceClientResourceGroupConnectionError

func NewFakeNamespaceClientResourceGroupConnectionError() *FakeNamespaceClient

func NewFakeNamespaceClientResourceGroupDeleteError

func NewFakeNamespaceClientResourceGroupDeleteError() *FakeNamespaceClient

func NewFakeNamespaceClientResourceGroupDoesNotExist

func NewFakeNamespaceClientResourceGroupDoesNotExist() *FakeNamespaceClient

func NewFakeNamespaceClientResourceGroupExists

func NewFakeNamespaceClientResourceGroupExists() *FakeNamespaceClient

func NewFakeNamespaceClientResourceGroupInDeletionMode

func NewFakeNamespaceClientResourceGroupInDeletionMode() *FakeNamespaceClient

func NewFakeNamespaceClientResourceGroupPropertiesError

func NewFakeNamespaceClientResourceGroupPropertiesError() *FakeNamespaceClient

func (*FakeNamespaceClient) CreateNamespace

func (nc *FakeNamespaceClient) CreateNamespace(ctx context.Context, azureCfg *azure.Config, groupName, namespace string, tags azure.Tags) (*eventhub.EHNamespace, error)

func (*FakeNamespaceClient) CreateResourceGroup

func (nc *FakeNamespaceClient) CreateResourceGroup(ctx context.Context, config *azure.Config, name string, tags azure.Tags) (resources.Group, error)

func (*FakeNamespaceClient) DeleteResourceGroup

func (*FakeNamespaceClient) GetEventhubAccessKeys

func (nc *FakeNamespaceClient) GetEventhubAccessKeys(context.Context, string, string, string) (result eventhub.AccessKeys, err error)

func (*FakeNamespaceClient) GetResourceGroup

func (nc *FakeNamespaceClient) GetResourceGroup(context.Context, azure.Tags) (resources.Group, error)

Jump to

Keyboard shortcuts

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