url

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 1, 2019 License: Apache-2.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CURL

type CURL struct {
	Code int `json:"code"`
}

type Response

type Response struct {
	Test       int    `json:"test"`
	ReturnCode int    `json:"rc"`
	Error      string `json:"error"`

	CURL    CURL   `json:"curl"`
	Body    []byte `json:"body"`
	Headers string `json:"headers"`

	Response *http.Response
}

type Test

type Test struct {
	Name       string
	Req        *http.Request
	SkipVerify bool
	// we capture this here vs. the httpRequest
	// to facilitate passing to curl
	PostBodyFile string
	PodName      string
	Oc           *exutil.CLI

	Wants []func(*http.Response) error
}

func Expect

func Expect(method, url string) *Test

func (*Test) HasStatusCode

func (ut *Test) HasStatusCode(codes ...int) *Test

func (*Test) RedirectsTo

func (ut *Test) RedirectsTo(url string, codes ...int) *Test

func (*Test) SkipTLSVerification

func (ut *Test) SkipTLSVerification() *Test

func (*Test) Test

func (ut *Test) Test(i int, res *Response) error

func (*Test) Through

func (ut *Test) Through(addr string) *Test

func (*Test) ToShell

func (ut *Test) ToShell(i int) string

func (*Test) WithBodyToUpload

func (ut *Test) WithBodyToUpload(filename, podname string, oc *exutil.CLI) *Test

func (*Test) WithHeader

func (ut *Test) WithHeader(hdr, value string) *Test

func (*Test) WithToken

func (ut *Test) WithToken(token string) *Test

type Tester

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

func NewTester

func NewTester(client kclientset.Interface, ns string) *Tester

func (*Tester) Close

func (ut *Tester) Close()

func (*Tester) Podname

func (ut *Tester) Podname() string

func (*Tester) Response

func (ut *Tester) Response(test *Test) *Response

func (*Tester) Responses

func (ut *Tester) Responses(tests ...*Test) []*Response

func (*Tester) WithErrorPassthrough

func (ut *Tester) WithErrorPassthrough(pt bool) *Tester

func (*Tester) Within

func (ut *Tester) Within(t time.Duration, tests ...*Test)

Jump to

Keyboard shortcuts

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