GetSingleDataStore returns a DataStore that can be used for testing. This may be the default collection, or a named collection depending on whether SG_TEST_USE_DEFAULT_COLLECTION is set.
()
| 137 | // GetSingleDataStore returns a DataStore that can be used for testing. |
| 138 | // This may be the default collection, or a named collection depending on whether SG_TEST_USE_DEFAULT_COLLECTION is set. |
| 139 | func (b *TestBucket) GetSingleDataStore() sgbucket.DataStore { |
| 140 | if TestsUseNamedCollections() { |
| 141 | ds, err := b.GetNamedDataStore(0) |
| 142 | require.NoError(b.t, err) |
| 143 | return ds |
| 144 | } |
| 145 | return b.Bucket.DefaultDataStore() |
| 146 | } |
| 147 | |
| 148 | func (b *TestBucket) GetMetadataStore() sgbucket.DataStore { |
| 149 | return b.Bucket.DefaultDataStore() |