Documentation
¶
Overview ¶
Package testdrive is an internal httptest fixture for Drive, Docs, and Sheets.
Index ¶
- func Open(t testing.TB, fx *FX, holder *vfs.TokenHolder) vfs.Open
- type FX
- func (d *FX) Add(parent string, meta vfs.DriveMeta, body []byte)
- func (d *FX) FailDocBatch()
- func (d *FX) FailMeta(status int)
- func (d *FX) FailNextDocWrites(n int)
- func (d *FX) OnceMedia(id string, status int)
- func (d *FX) SeedDoc(id, rev string, spans []vfs.DocsSpan, tabs []vfs.DocTab)
- func (d *FX) SeedSheet(id string, snap vfs.SheetsSnapshot)
- func (d *FX) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (d *FX) SetDocRev(id, rev string)
- func (d *FX) SheetSnap(id string) vfs.SheetsSnapshot
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FX ¶
type FX struct {
Nodes map[string]*Node
Exports int
DocsBatches []vfs.DocsBatch
// contains filtered or unexported fields
}
FX is an in-memory Drive tree that speaks Drive v3, Docs, and Sheets HTTP.
func (*FX) FailDocBatch ¶
func (d *FX) FailDocBatch()
FailDocBatch makes documents.batchUpdate return HTTP 400 (ErrInvalidWrite).
func (*FX) FailNextDocWrites ¶
FailNextDocWrites makes the next n documents.batchUpdate calls return a revision conflict.
func (*FX) SeedSheet ¶
func (d *FX) SeedSheet(id string, snap vfs.SheetsSnapshot)
SeedSheet sets spreadsheets.get state for id.
Click to show internal directories.
Click to hide internal directories.