statetest

package
v0.0.0-...-6cf1bc9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2016 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StubPersistence

type StubPersistence struct {
	*testing.Stub

	RunFunc func(jujutxn.TransactionSource) error

	ReturnAll interface{} // homegenous(?) list of doc struct (not pointers)
	ReturnOne interface{} // a doc struct (not a pointer)

	ReturnApplicationExistsOps       []txn.Op
	ReturnIncCharmModifiedVersionOps []txn.Op
	ReturnNewCleanupOp               *txn.Op
}

func NewStubPersistence

func NewStubPersistence(stub *testing.Stub) *StubPersistence

func (*StubPersistence) All

func (s *StubPersistence) All(collName string, query, docs interface{}) error

func (*StubPersistence) ApplicationExistsOps

func (s *StubPersistence) ApplicationExistsOps(serviceID string) []txn.Op

func (*StubPersistence) IncCharmModifiedVersionOps

func (s *StubPersistence) IncCharmModifiedVersionOps(serviceID string) []txn.Op

func (*StubPersistence) NewCleanupOp

func (s *StubPersistence) NewCleanupOp(kind, prefix string) txn.Op

func (*StubPersistence) One

func (s *StubPersistence) One(collName, id string, doc interface{}) error

func (*StubPersistence) Run

func (*StubPersistence) RunTransaction

func (s *StubPersistence) RunTransaction(ops []txn.Op) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL