test

package
v0.0.0-...-9dacc49 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	SystemBundle
	AuthCode string `json:"authCode"`
}

Bundle metadata information

type GetBundlesResponse

type GetBundlesResponse struct {
	DeploymentID string       `json:"deploymentId"`
	System       SystemBundle `json:"system"`
	Bundles      []Bundle     `json:"bundles"`
}

GetBundlesResponse the response json to the get bundles

type MockApidServer

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

MockApidServer the container type for our test server

func CreateMockApidServer

func CreateMockApidServer() *MockApidServer

CreateMockApidServer create a mock apid server

func (*MockApidServer) CreateGetBundles

func (mockServer *MockApidServer) CreateGetBundles(status int, deploymentID string, system SystemBundle, bundles []Bundle, timeout int) error

CreateGetBundles Create a get bundle request that returns the specified http status and body. Does not make use of the If-Non-Match or block headers.

func (*MockApidServer) MockDeployment

func (mockServer *MockApidServer) MockDeployment(deploymentID string, status int, body []byte)

MockDeployment mock a response to the deployment

func (*MockApidServer) Start

func (mockServer *MockApidServer) Start()

Start start the mock server

func (*MockApidServer) Stop

func (mockServer *MockApidServer) Stop() error

Stop start the mock server

type SystemBundle

type SystemBundle struct {
	BundleID string `json:"bundleId"`
	URL      string `json:"url"`
}

SystemBundle the system bundle

Jump to

Keyboard shortcuts

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