testutil

package
v0.0.0-...-43166c5 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RepoName           = "stable"
	BogusRepo          = "bogon"
	ChartName          = "drupal"
	ChartVersionString = "0.3.4"
	UnparseableRepo    = "unparseable"
)

constants

Variables

This section is empty.

Functions

func AssertChartResourceBodyData

func AssertChartResourceBodyData(t *testing.T, chart *models.Resource, body *models.ResourceData)

AssertChartResourceBodyData asserts expected HTTP chart resource body data

func AssertChartVersionResourceBodyData

func AssertChartVersionResourceBodyData(t *testing.T, chart *models.Resource, body *models.ResourceData)

AssertChartVersionResourceBodyData asserts expected HTTP "chart version" resource body data

func AssertErrBodyData

func AssertErrBodyData(t *testing.T, code int64, resource string, body models.Error)

AssertErrBodyData asserts expected HTTP error response body data

func ChartResourceAttributesFromHTTPResponse

func ChartResourceAttributesFromHTTPResponse(body *models.ResourceData) (*models.Chart, error)

ChartResourceAttributesFromHTTPResponse is a convenience that grabs the Attributes interface from a chart resource in generic models.ResourceData form and converts to a models.Chart

func ChartVersionResourceAttributesFromHTTPResponse

func ChartVersionResourceAttributesFromHTTPResponse(body *models.ResourceData) (*models.ChartVersion, error)

ChartVersionResourceAttributesFromHTTPResponse is a convenience that grabs the Attributes interface from a chart resource in generic models.ResourceData form and converts to a models.ChartPackage

func ErrorModelFromJSON

func ErrorModelFromJSON(r io.Reader, errorModel *models.Error) error

ErrorModelFromJSON is a convenience that converts JSON to a models.Error

func ResourceArrayDataFromJSON

func ResourceArrayDataFromJSON(r io.Reader, resource *models.ResourceArrayData) error

ResourceArrayDataFromJSON is a convenience that converts JSON to a models.ResourceArrayData

func ResourceDataFromJSON

func ResourceDataFromJSON(r io.Reader, resource *models.ResourceData) error

ResourceDataFromJSON is a convenience that converts JSON to a models.ResourceData

Types

This section is empty.

Jump to

Keyboard shortcuts

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