url

package
v0.0.0-...-2cdd923 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

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