Documentation
¶
Index ¶
- Constants
- func CleanupDatastore(ctx context.Context, namespaces ...string) error
- func CleanupStorage(ctx context.Context, namespaces ...string) error
- func DatastoreFixture(ctx context.Context, path string, bindings interface{}) error
- func FixtureFromFile(ctx context.Context, path string, bindings interface{}) error
- func FixtureFromMap(ctx context.Context, arr []map[string]interface{}) error
- func Instance() aetest.Instance
- func NewContext() context.Context
- func NewRecorder(handler http.Handler) *httptest.Recorder
- func NewRequest(method string, path string, body io.Reader) (*http.Request, error)
- func ResetFixtureFromFile(ctx context.Context, path string, bindings interface{}, namespaces ...string) error
- func ResetMemcache(ctx context.Context, namespaces ...string) error
- func Run(f func() int) int
Constants ¶
View Source
const FixtureLoggerKey = "web.gae.gaetest.fixture"
Variables ¶
This section is empty.
Functions ¶
func CleanupDatastore ¶
CleanupDatastore is to remove all data in datastore
func CleanupStorage ¶
CleanupStorage cleans up all storage services (memcache and datastore)
func DatastoreFixture ¶
DatastoreFixture loads the fixtures from path to datastore.
func FixtureFromFile ¶
FixtureFromFile is to load fixtures from a file.
func FixtureFromMap ¶
FixtureFromMap is to load fixtures from []map[string]interface{}
func NewContext ¶
NewContext returns a new appengine context.Context
func NewRecorder ¶
NewRecorder returns a new *httptest.Recorder object
func NewRequest ¶
NewRequest returns a new *http.Request bound with appengine context.Context
func ResetFixtureFromFile ¶
func ResetFixtureFromFile(ctx context.Context, path string, bindings interface{}, namespaces ...string) error
ResetFixtureFromFile is to reset all data in datastore and reload the fixtures from the file.
func ResetMemcache ¶
ResetMemcache resets all memcache entries
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.