testutils

package
v0.0.0-...-c381765 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateRoute

func AuthenticateRoute(r *http.Request) error

AuthenticateRoute will setup a route with token authentification

func CreateContainerServer

func CreateContainerServer(content []container.ContainerCreateCreatedBody) *httptest.Server

CreateContainerServer returns allows container creation and container running to be mocked

func GetMockToken

func GetMockToken(tokenValue string) (string, error)

GetMockToken setups an test environment for mocking auth api calls

func OkResponseContainerServer

func OkResponseContainerServer(content []types.Container) *httptest.Server

OkResponseContainerServer is a mock server to test the docker api against

Types

type MockLog

type MockLog struct {
	Test *testing.T
}

func (MockLog) Error

func (log MockLog) Error(data string) string

func (MockLog) Info

func (log MockLog) Info(data string) string

Jump to

Keyboard shortcuts

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