GetSingleDataStore will return a datastore if there is only one collection configured on the RestTester database.
()
| 585 | |
| 586 | // GetSingleDataStore will return a datastore if there is only one collection configured on the RestTester database. |
| 587 | func (rt *RestTester) GetSingleDataStore() base.DataStore { |
| 588 | collection, _ := rt.GetSingleTestDatabaseCollection() |
| 589 | ds, err := rt.GetDatabase().Bucket.NamedDataStore(base.ScopeAndCollectionName{ |
| 590 | Scope: collection.ScopeName, |
| 591 | Collection: collection.Name, |
| 592 | }) |
| 593 | require.NoError(rt.TB(), err) |
| 594 | return ds |
| 595 | } |
| 596 | |
| 597 | func (rt *RestTester) WaitForDoc(docid string) { |
| 598 | seq, err := rt.SequenceForDoc(docid) |