testing

package
v1.0.38 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotFoundError

func NotFoundError() error

NotFoundError convenience constructor for returning a not found error in mocks

Types

type ContainerClusterManagerMocks

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

func NewMockClusterManagerServerAndClient

func NewMockClusterManagerServerAndClient(t *testing.T) (*ContainerClusterManagerMocks, *container.ClusterManagerClient)

NewMockClusterManagerServerAndClient creates a connected mock cluster manager server and client

func (*ContainerClusterManagerMocks) ClusterManagerServer

func (c *ContainerClusterManagerMocks) ClusterManagerServer() *mocks.ClusterManagerServer

func (*ContainerClusterManagerMocks) ExpectGetCluster

func (c *ContainerClusterManagerMocks) ExpectGetCluster(projectId string, location string, clusterName string, cluster *containerpb.Cluster, err error)

type PubSubMocks

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

func NewMockPubSubServerAndClient

func NewMockPubSubServerAndClient(t *testing.T, projectId string) (*PubSubMocks, *pubsub.Client)

NewMockPubSubServerAndClient creates a connected mock cluster manager server and client

func (*PubSubMocks) ExpectDeleteSubscription

func (p *PubSubMocks) ExpectDeleteSubscription(subscriptionId string, err error)

func (*PubSubMocks) ExpectDeleteTopic

func (p *PubSubMocks) ExpectDeleteTopic(topicId string, err error)

func (*PubSubMocks) ExpectGetTopic

func (p *PubSubMocks) ExpectGetTopic(topicId string, resp *pubsubpb.Topic, err error)

func (*PubSubMocks) ExpectListTopicSubscriptions

func (p *PubSubMocks) ExpectListTopicSubscriptions(topicId string, subscriptionIDsToReturn []string, err error)

func (*PubSubMocks) PublisherServer

func (p *PubSubMocks) PublisherServer() *mocks.PublisherServer

func (*PubSubMocks) SubscriberServer

func (p *PubSubMocks) SubscriberServer() *mocks.SubscriberServer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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