marvintest

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetServerContext added in v0.1.3

func SetServerContext(ctx context.Context)

SetServerContext will override the server context and inject the given context into incoming requests. The effect of this function is global.

func SetupBenchmarkContext

func SetupBenchmarkContext(t *testing.B) func()

SetupBenchmarkContext will start up dev_appserver.py via `appengine/aetest` and inject the context into the marvin server so users can call `marvin.NewServer(svc).ServeHTTP(w, r)` within tests. This call is very expensive and should be used sparingly in your test suite.

func SetupTestContext

func SetupTestContext(t *testing.T) func()

SetupTestContext will start up dev_appserver.py via `appengine/aetest` and inject the context into the marvin server so users can call `marvin.NewServer(svc).ServeHTTP(w, r)` within tests. This call is very expensive and should be used sparingly in your test suite.

func SetupTestContextWithContext

func SetupTestContextWithContext(t *testing.T) (context.Context, func())

SetupTestContextWithContext will start up dev_appserver.py via `appengine/aetest` and inject the context into the marvin server so users can call `marvin.NewServer(svc).ServeHTTP(w, r)` within tests. This function also returns the server context for use outside the server. This call is very expensive and should be used sparingly in your test suite.

Types

This section is empty.

Jump to

Keyboard shortcuts

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