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.
()
| 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. |
| 2539 | func (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 |
| 2556 | func (rt *RestTester) ReadContinuousChanges(response *TestResponse) ([]db.ChangeEntry, error) { |