GetSingleKeyspace the name of the keyspace if there is only one test collection on one database.
()
| 2526 | |
| 2527 | // GetSingleKeyspace the name of the keyspace if there is only one test collection on one database. |
| 2528 | func (rt *RestTester) GetSingleKeyspace() string { |
| 2529 | db := rt.GetDatabase() |
| 2530 | require.Equal(rt.TB(), 1, len(db.CollectionByID), "Database must be configured with only one collection to use this function") |
| 2531 | for _, collection := range db.CollectionByID { |
| 2532 | return getRESTKeyspace(rt.TB(), db.Name, collection) |
| 2533 | } |
| 2534 | rt.TB().Fatal("Had no collection to return a keyspace for") // should be unreachable given length check above |
| 2535 | return "" |
| 2536 | } |
| 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 { |