(ctx context.Context, docid string, unmarshalLevel DocumentUnmarshalLevel)
| 34 | } |
| 35 | |
| 36 | func (t *testBackingStore) GetDocument(ctx context.Context, docid string, unmarshalLevel DocumentUnmarshalLevel) (doc *Document, err error) { |
| 37 | t.getDocumentCounter.Add(1) |
| 38 | |
| 39 | for _, d := range t.notFoundDocIDs { |
| 40 | if docid == d { |
| 41 | return nil, ErrMissing |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | doc = NewDocument(docid) |
| 46 | doc._body = Body{ |
| 47 | "testing": true, |
| 48 | } |
| 49 | const revTreeID = "1-abc" |
| 50 | doc.SetRevTreeID(revTreeID) |
| 51 | doc.History = RevTree{ |
| 52 | revTreeID: {}, |
| 53 | } |
| 54 | |
| 55 | doc.HLV = &HybridLogicalVector{ |
| 56 | SourceID: "test", |
| 57 | Version: 123, |
| 58 | } |
| 59 | _, _, err = doc.updateChannels(ctx, base.SetOf("*")) |
| 60 | if err != nil { |
| 61 | return nil, err |
| 62 | } |
| 63 | |
| 64 | return doc, nil |
| 65 | } |
| 66 | |
| 67 | func (t *testBackingStore) getRevision(ctx context.Context, doc *Document, revid string) ([]byte, AttachmentsMeta, base.Set, error) { |
| 68 | t.getRevisionCounter.Add(1) |
nothing calls this directly
no test coverage detected