testing

package
v0.0.0-...-25e0b32 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestClientCreator

func TestClientCreator(value interface{}) mongo.CreateFn

TestClientCreator returns a mongodb.CreateFn used to construct the mongo test client.

Types

type TestCSData

type TestCSData struct {
	DecodeErr error
	NewChange bson.M
	// contains filtered or unexported fields
}

TestCSData is the data used to configure the test MongoDb ChangeStream.

type TestChangeStream

type TestChangeStream struct {
	Data TestCSData
}

TestChangeStream wraps the fake mongo.ChangeStream.

func (*TestChangeStream) Decode

func (tCS *TestChangeStream) Decode(val interface{}) error

Decode implements mongo.Client.ChangeStream.Decode.

func (*TestChangeStream) Next

func (tCS *TestChangeStream) Next(ctx context.Context) bool

Next implements mongo.Client.ChangeStream.Next.

type TestClientData

type TestClientData struct {
	CreateClientErr error
	ConnectErr      error
	DisconnectErr   error
	CloseErr        error
	ListDbErr       error
	Databases       []string
	DbData          TestDbData
}

TestClientData is the data used to configure the test MongoDb client.

type TestDbData

type TestDbData struct {
	ListCollErr error
	Collections []string
}

TestDbData is the data used to configure the test MongoDb Database.

Jump to

Keyboard shortcuts

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