Help us shape the future of Go! Take the 2026 Go Developer Survey

testutil

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: Apache-2.0 Imports: 7 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

func ToJSONBody added in v0.5.0

func ToJSONBody(t *testing.T, body interface{}) *bytes.Buffer

ToJSONBody returns a JSON representation of a struct

Types

This section is empty.

Jump to

Keyboard shortcuts

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