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

Function getCollectionsForBLIP

rest/utilities_testing_blip_client.go:989–1001  ·  view source on GitHub ↗

getCollectionsForBLIP returns collections configured by a single database instance on a restTester. If only default collection exists, it will skip returning it to test "legacy" blip mode.

(rt *RestTester)

Source from the content-addressed store, hash-verified

987
988// getCollectionsForBLIP returns collections configured by a single database instance on a restTester. If only default collection exists, it will skip returning it to test "legacy" blip mode.
989func getCollectionsForBLIP(rt *RestTester) []string {
990 dbc := rt.GetDatabase()
991 var collections []string
992 for _, collection := range dbc.CollectionByID {
993 if base.IsDefaultCollection(collection.ScopeName, collection.Name) {
994 continue
995 }
996 collections = append(collections,
997 strings.Join([]string{collection.ScopeName, collection.Name}, base.ScopeCollectionSeparator))
998 }
999 slices.Sort(collections)
1000 return collections
1001}
1002
1003func (btcRunner *BlipTestClientRunner) NewBlipTesterClientOptsWithRT(rt *RestTester, opts *BlipTesterClientOpts) (client *BlipTesterClient) {
1004 return btcRunner.NewBlipTesterClientOptsWithRTAndContext(rt.Context(), rt, opts)

Callers 1

Calls 3

IsDefaultCollectionFunction · 0.92
SortMethod · 0.80
GetDatabaseMethod · 0.45

Tested by

no test coverage detected