functional_tests

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BinaryPrefix = ""
View Source
var HoverflyPassword = "password"
View Source
var HoverflyUsername = "benjih"
View Source
var Middleware = `` /* 745-byte string literal not displayed */

Functions

func BinaryErrorCheck

func BinaryErrorCheck(err error, binaryPath string)

func BuildBinaryPath

func BuildBinaryPath() string

func CopyDir added in v1.2.0

func CopyDir(src string, dst string) error

Dir copies a whole directory recursively

func CopyFile added in v1.2.0

func CopyFile(src, dst string) error

File copies a single file from src to dst

func DoRequest

func DoRequest(r *sling.Sling) *http.Response

func GenerateFileName added in v0.11.1

func GenerateFileName() string

func Healthcheck

func Healthcheck(adminPort int)

func Run

func Run(binary string, commands ...string) string

func TableToSliceMapStringString added in v0.11.1

func TableToSliceMapStringString(table string) map[string]map[string]string

func Unmarshal added in v0.17.3

func Unmarshal(data []byte, to interface{})

func UnmarshalFromResponse added in v0.17.3

func UnmarshalFromResponse(res *http.Response, to interface{})

Types

type Hoverfly

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

func NewHoverfly

func NewHoverfly() *Hoverfly

func NewHoverflyWithAdminPort added in v0.11.5

func NewHoverflyWithAdminPort(adminPort int) *Hoverfly

func (Hoverfly) DeleteBoltDb

func (this Hoverfly) DeleteBoltDb()

func (Hoverfly) DeleteDataSource added in v1.7.0

func (this Hoverfly) DeleteDataSource(name string) *v2.TemplateDataSourceView

func (Hoverfly) DeletePostServeAction added in v1.6.0

func (this Hoverfly) DeletePostServeAction(actionName string) *v2.PostServeActionDetailsView

func (Hoverfly) ExportSimulation added in v0.11.0

func (this Hoverfly) ExportSimulation() v2.SimulationViewV5

func (Hoverfly) FlushCache added in v0.11.0

func (this Hoverfly) FlushCache() v2.CacheView

func (Hoverfly) GetAPIToken added in v0.11.2

func (this Hoverfly) GetAPIToken(username, password string) string

func (Hoverfly) GetAdminPort

func (this Hoverfly) GetAdminPort() string

func (Hoverfly) GetAllDataSources added in v1.7.0

func (this Hoverfly) GetAllDataSources() *v2.TemplateDataSourceView

func (Hoverfly) GetAllPostServeAction added in v1.6.0

func (this Hoverfly) GetAllPostServeAction() *v2.PostServeActionDetailsView

func (Hoverfly) GetCache added in v0.11.0

func (this Hoverfly) GetCache() v2.CacheView

func (Hoverfly) GetLogFile added in v1.2.0

func (this Hoverfly) GetLogFile(logFile string) (string, error)

func (Hoverfly) GetMode

func (this Hoverfly) GetMode() *v2.ModeView

func (Hoverfly) GetPid added in v0.11.1

func (this Hoverfly) GetPid() int

func (Hoverfly) GetProxyPort

func (this Hoverfly) GetProxyPort() string

func (Hoverfly) GetSimulation

func (this Hoverfly) GetSimulation() io.Reader

func (Hoverfly) GetStdOut added in v1.2.0

func (this Hoverfly) GetStdOut() (string, error)

func (Hoverfly) ImportSimulation added in v0.11.0

func (this Hoverfly) ImportSimulation(simulation string)

func (Hoverfly) Proxy

func (this Hoverfly) Proxy(r *sling.Sling) *http.Response

func (Hoverfly) ProxyRequest added in v0.14.1

func (this Hoverfly) ProxyRequest(req *http.Request) *http.Response

func (Hoverfly) ProxyWithAuth added in v0.10.2

func (this Hoverfly) ProxyWithAuth(r *sling.Sling, user, password string) (*http.Response, error)

func (Hoverfly) SetDestination added in v0.12.3

func (this Hoverfly) SetDestination(destination string)

func (Hoverfly) SetLocalPostServeAction added in v1.9.0

func (this Hoverfly) SetLocalPostServeAction(actionName, binary, scriptContent string, delayInMs int) *v2.PostServeActionDetailsView

func (Hoverfly) SetMiddleware

func (this Hoverfly) SetMiddleware(binary, script string)

func (Hoverfly) SetMode

func (this Hoverfly) SetMode(mode string)

func (Hoverfly) SetModeWithArgs added in v0.11.0

func (this Hoverfly) SetModeWithArgs(mode string, arguments v2.ModeArgumentsView)

func (Hoverfly) SetPACFile added in v0.17.4

func (this Hoverfly) SetPACFile(pacFile string)

func (Hoverfly) SetRemotePostServeAction added in v1.9.0

func (this Hoverfly) SetRemotePostServeAction(actionName, remote string, delayInMs int) *v2.PostServeActionDetailsView

func (Hoverfly) SetTemplateDataSource added in v1.7.0

func (this Hoverfly) SetTemplateDataSource(dataSourceName, content string) *v2.TemplateDataSourceView

func (*Hoverfly) Start

func (this *Hoverfly) Start(commands ...string)

func (Hoverfly) Stop

func (this Hoverfly) Stop()

func (Hoverfly) StopAPIAuthenticated added in v0.11.5

func (this Hoverfly) StopAPIAuthenticated(username, password string)

func (Hoverfly) WriteLogsIfError added in v0.13.0

func (this Hoverfly) WriteLogsIfError()

Used for debugging when trying to find out why a functional test is failing

Jump to

Keyboard shortcuts

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