tests

package
v0.0.0-...-77419e6 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunBashTest

func RunBashTest(test *specs.BashTest, executor CommandExecutor) string

RunBashTest executes a BashTest rule, returning an empty string if the test passes, otherwise the error message.

func RunHttpTest

func RunHttpTest(test *specs.HttpTest, client *http.Client) string

RunHttpTest executes an HttpTest rule, returning an empty string if the test passes, otherwise the error message.

Types

type CommandExecutor

type CommandExecutor interface {
	RunTest(test *specs.BashTest) (int, string, string, error)
}

type RealExecutor

type RealExecutor struct{}

func (*RealExecutor) RunTest

func (e *RealExecutor) RunTest(test *specs.BashTest) (int, string, string, error)

Jump to

Keyboard shortcuts

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