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

Function addDatabaseAndTestUserContext

db/util_testing.go:611–613  ·  view source on GitHub ↗

addDatabaseAndTestUserContext adds a fake user to the context

(ctx context.Context, db *Database)

Source from the content-addressed store, hash-verified

609
610// addDatabaseAndTestUserContext adds a fake user to the context
611func addDatabaseAndTestUserContext(ctx context.Context, db *Database) context.Context {
612 return db.AddDatabaseLogContext(base.UserLogCtx(ctx, "gotest", base.UserDomainBuiltin, nil))
613}
614
615// GetScopesOptions sets up a ScopesOptions from a TestBucket. This will set up default or non default collections depending on the test harness use of SG_TEST_USE_DEFAULT_COLLECTION and whether the backing store supports collections.
616func GetScopesOptions(t testing.TB, bucket base.Bucket, numCollections int) ScopesOptions {

Callers 3

CreateTestDatabaseFunction · 0.85

Calls 2

UserLogCtxFunction · 0.92
AddDatabaseLogContextMethod · 0.80

Tested by 2