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

Method RunSubprotocolV4

rest/utilities_testing_isgr.go:110–127  ·  view source on GitHub ↗
(test func(t *testing.T))

Source from the content-addressed store, hash-verified

108}
109
110func (runner *SGRTestRunner) RunSubprotocolV4(test func(t *testing.T)) {
111 if runner.initialisedInsideRunnerCode {
112 require.FailNow(runner.TB(), "must not initialise SGRPeers outside Run() method")
113 }
114
115 runner.initialisedInsideRunnerCode = true
116 defer func() {
117 // reset bool post test run to ensure no one can setup SetupSGRPeers outside run method upon completion of Run()
118 runner.initialisedInsideRunnerCode = false
119 }()
120
121 if !runner.SkipSubtest[VersionVectorSubtestName] {
122 runner.t.Run(VersionVectorSubtestName, func(t *testing.T) {
123 runner.SupportedSubprotocols = []string{db.CBMobileReplicationV4.SubprotocolString()}
124 test(t)
125 })
126 }
127}
128
129func (runner *SGRTestRunner) IsV4Protocol() bool {
130 return slices.Contains(runner.SupportedSubprotocols, db.CBMobileReplicationV4.SubprotocolString())

Calls 4

TBMethod · 0.95
testStruct · 0.85
SubprotocolStringMethod · 0.80
RunMethod · 0.65