gae-go-testing: github.com/tenntenn/gae-go-testing Index | Files

package appenginetesting

import "github.com/tenntenn/gae-go-testing"

Package appenginetesting provides an appengine.Context for testing.

Index

Package Files

app.yaml.templ.go context.go helper.templ.go recorder.go

Constants

const DefaultAPIVersion = "go1"

Default API Version

Variables

var APIVersion = DefaultAPIVersion

API version of golang. It is used for app.yaml of dev_server setting.

type Context Uses

type Context struct {
    // contains filtered or unexported fields
}

Context implements appengine.Context by running a dev_appserver.py process as a child and proxying all Context calls to the child. Use NewContext to create one.

func NewContext Uses

func NewContext(opts *Options) (*Context, error)

NewContext returns a new AppEngine context with an empty datastore, etc. A nil Options is valid and means to use the default values.

func (*Context) AppID Uses

func (c *Context) AppID() string

func (*Context) Call Uses

func (c *Context) Call(service, method string, in, out proto.Message, opts *appengine_internal.CallOptions) error

func (*Context) Close Uses

func (c *Context) Close()

Close kills the child dev_appserver.py process, releasing its resources.

Close is not part of the appengine.Context interface.

func (*Context) Criticalf Uses

func (c *Context) Criticalf(format string, args ...interface{})

func (*Context) Debugf Uses

func (c *Context) Debugf(format string, args ...interface{})

func (*Context) Errorf Uses

func (c *Context) Errorf(format string, args ...interface{})

func (*Context) FullyQualifiedAppID Uses

func (c *Context) FullyQualifiedAppID() string

func (*Context) Infof Uses

func (c *Context) Infof(format string, args ...interface{})

func (*Context) Request Uses

func (c *Context) Request() interface{}

func (*Context) Warningf Uses

func (c *Context) Warningf(format string, args ...interface{})

type ContextRecorder Uses

type ContextRecorder struct {
    // contains filtered or unexported fields
}

func NewContextRecorder Uses

func NewContextRecorder(opts *Options) *ContextRecorder

func (*ContextRecorder) Context Uses

func (r *ContextRecorder) Context() *Context

func (*ContextRecorder) Creator Uses

func (r *ContextRecorder) Creator() func(r *http.Request) appengine.Context

type Options Uses

type Options struct {
    // AppId to pretend to be. By default, "testapp"
    AppId string
}

Options control optional behavior for NewContext.

Package appenginetesting imports 18 packages (graph) and is imported by 1 packages. Updated 2016-07-17. Refresh now. Tools for package owners.