func CreateMockSubscription(ctx context.Context, done chan<- bool, projectID, topicID, subscriptionID string, deadline time.Duration, filter string, assert func(msg *pubSub.Message), opts ...option.ClientOption) error
CreateMockSubscription creates a mock pubsub subscription and receives an assertion function to assert the pubsub message.
func CreateMockTopic(ctx context.Context, projectID, topicID string, opts ...option.ClientOption) (*pubSub.Topic, error)
CreateMockTopic creates a mock pubsub topic.
func NewMockPubsubServer() (option.ClientOption, error)
NewMockPubsubServer creates a new mock pubsub server and returns a client option.
func SendMessage(ctx context.Context, projectID, topicID, message string, attributes map[string]string, opts ...option.ClientOption) error
SendMessage publishes a pubsub message to the specified topic.
type MockPubsubServerResponse struct { PubsubServer *pstest.Server Conn *grpc.ClientConn }
func SetupMockPubsubServer() (*MockPubsubServerResponse, error)