govalintesting

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPTestUtil

func HTTPTestUtil(serverF TestFunc, testFunc ExecFunc)

func TestExit added in v0.1.0

func TestExit(t *testing.T, testFunc func()) (int, string)

Types

type ExecFunc

type ExecFunc func(http GovalinHTTP)

type GovalinHTTP

type GovalinHTTP struct {
	Host string
	// contains filtered or unexported fields
}

GovalinHTTP is a simple wrapper with utility methods to simplify testing.

func (*GovalinHTTP) Delete added in v0.0.6

func (govalinHttp *GovalinHTTP) Delete(path string, deleteData ...any) string

func (*GovalinHTTP) DeleteResponse added in v0.0.6

func (govalinHttp *GovalinHTTP) DeleteResponse(path string, deleteData ...any) *httpclient.Response

func (*GovalinHTTP) Get

func (govalinHttp *GovalinHTTP) Get(path string, params ...any) string

func (*GovalinHTTP) GetResponse

func (govalinHttp *GovalinHTTP) GetResponse(path string, params ...any) *httpclient.Response

func (*GovalinHTTP) Head added in v0.0.6

func (govalinHttp *GovalinHTTP) Head(path string) string

func (*GovalinHTTP) HeadResponse added in v0.0.6

func (govalinHttp *GovalinHTTP) HeadResponse(path string) *httpclient.Response

func (*GovalinHTTP) OptionResponse added in v0.0.6

func (govalinHttp *GovalinHTTP) OptionResponse(path string, optionsData ...map[string]string) *httpclient.Response

func (*GovalinHTTP) Options added in v0.0.6

func (govalinHttp *GovalinHTTP) Options(path string, optionsData ...map[string]string) string

func (*GovalinHTTP) Patch added in v0.0.6

func (govalinHttp *GovalinHTTP) Patch(path string, patchData map[string]string) string

func (*GovalinHTTP) PatchResponse added in v0.0.6

func (govalinHttp *GovalinHTTP) PatchResponse(path string, patchData map[string]string) *httpclient.Response

func (*GovalinHTTP) Post

func (govalinHttp *GovalinHTTP) Post(path string, postData any) string

func (*GovalinHTTP) PostResponse

func (govalinHttp *GovalinHTTP) PostResponse(path string, postData any) *httpclient.Response

func (*GovalinHTTP) Put added in v0.0.6

func (govalinHttp *GovalinHTTP) Put(path string, putData io.Reader) string

func (*GovalinHTTP) PutResponse added in v0.0.6

func (govalinHttp *GovalinHTTP) PutResponse(path string, putData io.Reader) *httpclient.Response

func (*GovalinHTTP) Raw

func (govalinHttp *GovalinHTTP) Raw() *httpclient.HttpClient

type TestFunc

type TestFunc func(app *govalin.App) *govalin.App

Jump to

Keyboard shortcuts

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