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

Method GetSingleDataStore

base/util_testing.go:139–146  ·  view source on GitHub ↗

GetSingleDataStore returns a DataStore that can be used for testing. This may be the default collection, or a named collection depending on whether SG_TEST_USE_DEFAULT_COLLECTION is set.

()

Source from the content-addressed store, hash-verified

137// GetSingleDataStore returns a DataStore that can be used for testing.
138// This may be the default collection, or a named collection depending on whether SG_TEST_USE_DEFAULT_COLLECTION is set.
139func (b *TestBucket) GetSingleDataStore() sgbucket.DataStore {
140 if TestsUseNamedCollections() {
141 ds, err := b.GetNamedDataStore(0)
142 require.NoError(b.t, err)
143 return ds
144 }
145 return b.Bucket.DefaultDataStore()
146}
147
148func (b *TestBucket) GetMetadataStore() sgbucket.DataStore {
149 return b.Bucket.DefaultDataStore()

Calls 3

GetNamedDataStoreMethod · 0.95
TestsUseNamedCollectionsFunction · 0.85
DefaultDataStoreMethod · 0.45