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

Function makeDbConfig

rest/persistent_config_test.go:1352–1371  ·  view source on GitHub ↗
(bucketName string, dbName string, scopesConfig ScopesConfig)

Source from the content-addressed store, hash-verified

1350}
1351
1352func makeDbConfig(bucketName string, dbName string, scopesConfig ScopesConfig) DbConfig {
1353 enableXattrs := base.TestUseXattrs()
1354 dbConfig := DbConfig{
1355 BucketConfig: BucketConfig{
1356 Bucket: &bucketName,
1357 },
1358 Index: &IndexConfig{
1359 NumReplicas: base.Ptr(uint(0)),
1360 },
1361 EnableXattrs: &enableXattrs,
1362 Scopes: scopesConfig,
1363 }
1364 if scopesConfig != nil {
1365 dbConfig.Scopes = scopesConfig
1366 }
1367 if dbName != "" {
1368 dbConfig.Name = dbName
1369 }
1370 return dbConfig
1371}
1372
1373func TestPersistentConfigNoBucketField(t *testing.T) {
1374 base.RequireNumTestBuckets(t, 2)

Calls 2

TestUseXattrsFunction · 0.92
PtrFunction · 0.92

Tested by

no test coverage detected