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

Function documentRevisionForCacheTest

db/revision_cache_test.go:1674–1683  ·  view source on GitHub ↗

documentRevisionForCacheTest creates a document revision with the specified body and key, and a hardcoded revID, cv and history: RevID: 1-abc CV: Version{SourceID: "test", Value: 123} History: Revisions{"start": 1}}

(key string, body string)

Source from the content-addressed store, hash-verified

1672// CV: Version{SourceID: "test", Value: 123}
1673// History: Revisions{"start": 1}}
1674func documentRevisionForCacheTest(key string, body string) DocumentRevision {
1675 cv := Version{SourceID: "test", Value: 123}
1676 return DocumentRevision{
1677 BodyBytes: []byte(body),
1678 DocID: key,
1679 RevID: "1-abc",
1680 History: Revisions{"start": 1},
1681 CV: &cv,
1682 }
1683}
1684
1685// documentRevisionForCacheTestUpsert creates a document revision with the specified body and key and Version
1686//

Calls

no outgoing calls

Tested by

no test coverage detected