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

Function TestSubprotocolString

db/blip_test.go:22–29  ·  view source on GitHub ↗

TestSubprotocolString roundtrips the parse/format Subprotocol methods on the subprotocol constants.

(t *testing.T)

Source from the content-addressed store, hash-verified

20
21// TestSubprotocolString roundtrips the parse/format Subprotocol methods on the subprotocol constants.
22func TestSubprotocolString(t *testing.T) {
23 for i := minCBMobileSubprotocolVersion; i <= maxCBMobileSubprotocolVersion; i++ {
24 str := i.SubprotocolString()
25 parsed, err := ParseSubprotocolString(str)
26 require.NoError(t, err)
27 require.Equal(t, i, parsed)
28 }
29}
30
31func TestBlipCorrelationID(t *testing.T) {
32 db, ctx := setupTestDB(t)

Callers

nothing calls this directly

Calls 3

ParseSubprotocolStringFunction · 0.85
SubprotocolStringMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected