MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / setupTestDBWithViewsEnabled

Function setupTestDBWithViewsEnabled

db/database_test.go:105–114  ·  view source on GitHub ↗

Forces UseViews:true in the database context. Useful for testing w/ views while running tests against Couchbase Server

(t testing.TB)

Source from the content-addressed store, hash-verified

103// Forces UseViews:true in the database context. Useful for testing w/ views while running
104// tests against Couchbase Server
105func setupTestDBWithViewsEnabled(t testing.TB) (*Database, context.Context) {
106 if !base.TestsDisableGSI() {
107 t.Skip("GSI is not compatible with views")
108 }
109 dbcOptions := DatabaseContextOptions{
110 UseViews: true,
111 Scopes: GetScopesOptionsDefaultCollectionOnly(t),
112 }
113 return SetupTestDBWithOptions(t, dbcOptions)
114}
115
116// Sets up a test bucket with _sync:seq initialized to a high value prior to database creation. Used to test
117// issues with custom _sync:seq values without triggering skipped sequences between 0 and customSeq

Callers 3

TestRevisionCacheLoadFunction · 0.85
TestUpdateDesignDocFunction · 0.85
TestChannelViewFunction · 0.85

Calls 3

TestsDisableGSIFunction · 0.92
SetupTestDBWithOptionsFunction · 0.85

Tested by

no test coverage detected