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

Function testLogEntryForChannels

db/change_cache_test.go:39–52  ·  view source on GitHub ↗

Creates a log entry with key "doc_[sequence]", rev="1-abc" with the specified channels

(seq int, channelNames []string)

Source from the content-addressed store, hash-verified

37
38// Creates a log entry with key "doc_[sequence]", rev="1-abc" with the specified channels
39func testLogEntryForChannels(seq int, channelNames []string) *LogEntry {
40 channelMap := make(channels.ChannelMap)
41 for _, channelName := range channelNames {
42 channelMap[channelName] = nil
43 }
44
45 return &LogEntry{
46 Sequence: uint64(seq),
47 DocID: fmt.Sprintf("doc_%d", seq),
48 RevID: "1-abc",
49 TimeReceived: channels.NewFeedTimestampFromNow(),
50 Channels: channelMap,
51 }
52}
53
54// Tombstoned entry
55func et(seq uint64, docid string, revid string) *LogEntry {

Calls 1

NewFeedTimestampFromNowFunction · 0.92

Tested by

no test coverage detected