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

Function TestBootstrapConfig

rest/config_manager_test.go:21–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19)
20
21func TestBootstrapConfig(t *testing.T) {
22 base.TestRequiresCollections(t)
23
24 base.SetUpTestLogging(t, base.LevelInfo, base.KeyHTTP, base.KeyDCP)
25
26 // Start SG with no databases
27 config := BootstrapStartupConfigForTest(t)
28 ctx := base.TestCtx(t)
29 sc, err := SetupServerContext(ctx, &config, true)
30 require.NoError(t, err)
31 defer func() {
32 sc.Close(ctx)
33 }()
34
35 bootstrapContext := sc.BootstrapContext
36
37 // Get a test bucket for bootstrap testing
38 tb := base.GetTestBucket(t)
39 defer tb.Close(ctx)
40
41 bucketName := tb.GetName()
42 db1Name := "db"
43 configGroup1 := "cg1"
44
45 var dbConfig1 *DatabaseConfig
46
47 _, err = bootstrapContext.GetConfig(ctx, bucketName, configGroup1, db1Name, dbConfig1)
48 require.Error(t, err)
49}
50
51func TestComputeMetadataID(t *testing.T) {
52

Callers

nothing calls this directly

Calls 10

TestRequiresCollectionsFunction · 0.92
SetUpTestLoggingFunction · 0.92
TestCtxFunction · 0.92
GetTestBucketFunction · 0.92
SetupServerContextFunction · 0.85
CloseMethod · 0.65
GetNameMethod · 0.65
GetConfigMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected