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

Method getCollectionsForBLIP

rest/utilities_testing.go:2539–2553  ·  view source on GitHub ↗

getCollectionsForBLIP returns scope.collection strings for blip to process GetCollections messages. To test legacy functionality when SG_TEST_USE_DEFAULT_COLLECTION=true, don't return default collection if it is the only collection available.

()

Source from the content-addressed store, hash-verified

2537
2538// getCollectionsForBLIP returns scope.collection strings for blip to process GetCollections messages. To test legacy functionality when SG_TEST_USE_DEFAULT_COLLECTION=true, don't return default collection if it is the only collection available.
2539func (rt *RestTester) getCollectionsForBLIP() []string {
2540 db := rt.GetDatabase()
2541 var collections []string
2542 if db.OnlyDefaultCollection() {
2543 return collections
2544 }
2545 for _, collection := range db.CollectionByID {
2546 collections = append(collections, base.ScopeAndCollectionName{
2547 Scope: collection.ScopeName,
2548 Collection: collection.Name,
2549 }.String())
2550 }
2551 sort.Strings(collections)
2552 return collections
2553}
2554
2555// Reads continuous changes feed response into slice of ChangeEntry
2556func (rt *RestTester) ReadContinuousChanges(response *TestResponse) ([]db.ChangeEntry, error) {

Calls 3

GetDatabaseMethod · 0.95
OnlyDefaultCollectionMethod · 0.80
StringMethod · 0.65