contexttest

package
v0.0.0-...-23e6066 Latest Latest
Warning

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

Go to latest
Published: May 3, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package contexttest builds a test context.Context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(tb testing.TB) context.Context

Context returns a Context that may be used in tests. Uses ptrace as the platform.Platform.

func RootContext

func RootContext(tb testing.TB) context.Context

RootContext returns a Context that may be used in tests that need root credentials. Uses ptrace as the platform.Platform.

func WithCreds

func WithCreds(ctx context.Context, creds *auth.Credentials) context.Context

WithCreds returns a copy of ctx carrying creds.

func WithLimitSet

func WithLimitSet(ctx context.Context, l *limits.LimitSet) context.Context

WithLimitSet returns a copy of ctx carrying l.

Types

This section is empty.

Jump to

Keyboard shortcuts

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