runner

package
v1.16.12-beta007 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT, MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveTemplate

func ResolveTemplate(stringToResolve string, params map[string]string) (string, error)

ResolveTemplate fills a string with the values if they are templated

func ResolveTemplates

func ResolveTemplates(stringsToResolve []string, params map[string]string) error

ResolveTemplates fills the string array with the values if they are templated

Types

type CurlRunner

type CurlRunner struct {
	Params  envs.Params
	Log     *zap.SugaredLogger
	Scraper scraper.Scraper
}

CurlRunner is used to run curl commands.

func NewCurlRunner

func NewCurlRunner(ctx context.Context, params envs.Params) (*CurlRunner, error)

func (*CurlRunner) GetType

func (r *CurlRunner) GetType() runner.Type

GetType returns runner type

func (*CurlRunner) Run

func (r *CurlRunner) Run(ctx context.Context, execution testkube.Execution) (result testkube.ExecutionResult, err error)

type CurlRunnerInput

type CurlRunnerInput struct {
	Command        []string `json:"command"`
	ExpectedStatus string   `json:"expected_status"`
	ExpectedBody   string   `json:"expected_body"`
}

CurlRunnerInput is the input for the CurlRunner

func (*CurlRunnerInput) FillTemplates

func (runnerInput *CurlRunnerInput) FillTemplates(params map[string]string) error

FillTemplates resolves the templates from the CurlRunnerInput against the values in the param

Jump to

Keyboard shortcuts

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