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

Function AddOptionsFromEnvironmentVariables

db/util_testing.go:568–576  ·  view source on GitHub ↗

If certain environment variables are set, for example to turn on XATTR support, then update the DatabaseContextOptions accordingly

(dbcOptions *DatabaseContextOptions)

Source from the content-addressed store, hash-verified

566// If certain environment variables are set, for example to turn on XATTR support, then update
567// the DatabaseContextOptions accordingly
568func AddOptionsFromEnvironmentVariables(dbcOptions *DatabaseContextOptions) {
569 if base.TestUseXattrs() {
570 dbcOptions.EnableXattr = true
571 }
572
573 if base.TestsDisableGSI() {
574 dbcOptions.UseViews = true
575 }
576}
577
578// SetupTestDBWithOptions creates an online test db with the specified database context options. Note that environment variables will override values (SG_TEST_USE_XATTRS, SG_TEST_USE_DEFAULT_COLLECTION).
579// override somedbcOptions properties.

Calls 2

TestUseXattrsFunction · 0.92
TestsDisableGSIFunction · 0.92