helper

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RPCPort                    = 21101
	RPCMaxRequestBytes         = 4 * 1024 * 1024
	ProfilingPort              = 21102
	MongoConnectionURI         = "mongodb://localhost:27017"
	MongoConnectionTimeout     = "5s"
	MongoPingTimeout           = "5s"
	SnapshotThreshold          = 10
	Collection                 = "test-collection"
	AuthWebhookMaxWaitInterval = 3 * gotime.Millisecond
	AuthWebhookSize            = 100
	AuthWebhookCacheAuthTTL    = 10 * gotime.Second
	AuthWebhookCacheUnauthTTL  = 10 * gotime.Second
	ETCDDialTimeout            = 5 * gotime.Second
	ETCDLockLeaseTime          = 30 * gotime.Second
)

Below are the values of the Yorkie config used in the test.

Variables

View Source
var (
	// ETCDEndpoints is the list of endpoints to connect to for etcd.
	ETCDEndpoints = []string{"localhost:2379"}
)

Functions

func TestConfig added in v0.1.5

func TestConfig(authWebhook string) *yorkie.Config

TestConfig returns config for creating Yorkie instance.

func TestDBName

func TestDBName() string

TestDBName returns the name of test database with timestamp. timestamp is set only once on first call.

func TestRoot

func TestRoot() *json.Root

TestRoot returns the root

func TestYorkie

func TestYorkie() *yorkie.Yorkie

TestYorkie returns a new instance of Yorkie for testing.

func TextChangeContext

func TextChangeContext(root *json.Root) *change.Context

TextChangeContext returns the context of test change.

Types

This section is empty.

Jump to

Keyboard shortcuts

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