Documentation
¶
Overview ¶
Package helper provides helper functions for testing.
Index ¶
- Variables
- func CreateAdminCli(t assert.TestingT, adminAddr string) *adminClient.Client
- func NewRangeSlice(start, end int) []int
- func TestConfig() *server.Config
- func TestDBName() string
- func TestDocKey(t testing.TB) key.Key
- func TestRoot() *crdt.Root
- func TestServer() *server.Yorkie
- func TextChangeContext(root *crdt.Root) *change.Context
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RPCPort = 21101 RPCMaxRequestBytes = uint64(4 * 1024 * 1024) RPCMaxConnectionAge = 4 * gotime.Second RPCMaxConnectionAgeGrace = 1 * gotime.Second ProfilingPort = 21102 AdminPort = 21103 AdminUser = server.DefaultAdminUser AdminPassword = server.DefaultAdminPassword HousekeepingInterval = 10 * gotime.Second HousekeepingCandidatesLimitPerProject = 10 ClientDeactivateThreshold = "10s" SnapshotThreshold = int64(10) SnapshotWithPurgingChanges = false AuthWebhookMaxWaitInterval = 3 * gotime.Millisecond AuthWebhookSize = 100 AuthWebhookCacheAuthTTL = 10 * gotime.Second AuthWebhookCacheUnauthTTL = 10 * gotime.Second MongoConnectionURI = "mongodb://localhost:27017" MongoConnectionTimeout = "5s" MongoPingTimeout = "5s" )
Below are the values of the Yorkie config used in the test.
Functions ¶
func CreateAdminCli ¶ added in v0.2.14
func CreateAdminCli(t assert.TestingT, adminAddr string) *adminClient.Client
CreateAdminCli returns a new instance of admin cli for testing.
func NewRangeSlice ¶ added in v0.3.3
NewRangeSlice returns a slice of integers from start to end.
func TestConfig ¶ added in v0.1.5
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 TestDocKey ¶ added in v0.3.1
TestDocKey returns a new instance of document key for testing.
func TestServer ¶ added in v0.2.4
TestServer returns a new instance of Yorkie for testing.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.