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)
| 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. |
| 989 | func 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 | |
| 1003 | func (btcRunner *BlipTestClientRunner) NewBlipTesterClientOptsWithRT(rt *RestTester, opts *BlipTesterClientOpts) (client *BlipTesterClient) { |
| 1004 | return btcRunner.NewBlipTesterClientOptsWithRTAndContext(rt.Context(), rt, opts) |
no test coverage detected