MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / getTestBucket

Function getTestBucket

base/util_testing.go:110–118  ·  view source on GitHub ↗

getTestBucket returns a bucket from the bucket pool. Persistent flag determines behaviour for walrus buckets only - Couchbase bucket behaviour is defined by the bucket pool readier/init.

(t testing.TB, persistent bool)

Source from the content-addressed store, hash-verified

108// getTestBucket returns a bucket from the bucket pool. Persistent flag determines behaviour for walrus
109// buckets only - Couchbase bucket behaviour is defined by the bucket pool readier/init.
110func getTestBucket(t testing.TB, persistent bool) *TestBucket {
111 bucket, spec, closeFn := GTestBucketPool.getTestBucketAndSpec(t, persistent)
112 return &TestBucket{
113 Bucket: bucket,
114 BucketSpec: spec,
115 closeFn: closeFn,
116 t: t,
117 }
118}
119
120// GetNamedDataStore returns a named datastore from the TestBucket. Each number (starting from 0, indicates which data store you'll get.
121func (tb *TestBucket) GetNamedDataStore(count int) (DataStore, error) {

Callers 2

GetTestBucketFunction · 0.85

Calls 1

getTestBucketAndSpecMethod · 0.80

Tested by 1