Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyInputOverrides ¶ added in v0.6.0
ApplyInputOverride will check if config had global overrides and write that into the test.
func DescribeYamlError ¶ added in v0.6.0
Types ¶
type FTWTest ¶
type FTWTest struct {
FileName string
Meta struct {
Author string `yaml:"author,omitempty"`
Enabled *bool `yaml:"enabled,omitempty"`
Name string `yaml:"name,omitempty"`
Description string `yaml:"description,omitempty"`
} `yaml:"meta"`
Tests []Test `yaml:"tests"`
}
FTWTest is the base type used when unmarshaling
func GetTestFromYaml ¶
GetTestFromYaml will get the tests to be processed from a YAML string.
func GetTestsFromFiles ¶
GetTestsFromFiles will get the files to be processed. If some file has yaml error, will stop processing and return the error with the partial list of files read.
type Input ¶
type Input struct {
DestAddr *string `yaml:"dest_addr,omitempty"`
Port *int `yaml:"port,omitempty"`
Protocol *string `yaml:"protocol,omitempty"`
URI *string `yaml:"uri,omitempty"`
Version *string `yaml:"version,omitempty"`
Headers ftwhttp.Header `yaml:"headers,omitempty"`
Method *string `yaml:"method,omitempty"`
Data *string `yaml:"data,omitempty"`
SaveCookie *bool `yaml:"save_cookie,omitempty"`
// Deprecated: replaced with AutocompleteHeaders
StopMagic *bool `yaml:"stop_magic"`
AutocompleteHeaders *bool `yaml:"autocomplete_headers"`
EncodedRequest string `yaml:"encoded_request,omitempty"`
RAWRequest string `yaml:"raw_request,omitempty"`
}
func (*Input) GetDestAddr ¶
GetDestAddr returns the proper semantic when the field is empty
func (*Input) GetProtocol ¶
GetProtocol returns the proper semantic when the field is empty
func (*Input) GetRawRequest ¶
GetRawRequest returns the proper raw data, and error if there was none
func (*Input) GetVersion ¶
GetVersion returns the proper semantic when the field is empty
type Output ¶
type Output struct {
Status []int `yaml:"status,flow,omitempty"`
ResponseContains string `yaml:"response_contains,omitempty"`
LogContains string `yaml:"log_contains,omitempty"`
NoLogContains string `yaml:"no_log_contains,omitempty"`
ExpectError *bool `yaml:"expect_error,omitempty"`
}
Output is the response expected from the test
type Overrides ¶ added in v0.4.9
type Overrides struct {
DestAddr *string `yaml:"dest_addr,omitempty" koanf:"dest_addr,omitempty"`
Port *int `yaml:"port,omitempty" koanf:"port,omitempty"`
Protocol *string `yaml:"protocol,omitempty" koanf:"protocol,omitempty"`
URI *string `yaml:"uri,omitempty" koanf:"uri,omitempty"`
Version *string `yaml:"version,omitempty" koanf:"version,omitempty"`
Headers ftwhttp.Header `yaml:"headers,omitempty" koanf:"headers,omitempty"`
Method *string `yaml:"method,omitempty" koanf:"method,omitempty"`
Data *string `yaml:"data,omitempty" koanf:"data,omitempty"`
SaveCookie *bool `yaml:"save_cookie,omitempty" koanf:"save_cookie,omitempty"`
// Deprecated: replaced with AutocompleteHeaders
StopMagic *bool `yaml:"stop_magic" koanf:"stop_magic,omitempty"`
AutocompleteHeaders *bool `yaml:"autocomplete_headers" koanf:"autocomplete_headers,omitempty"`
EncodedRequest *string `yaml:"encoded_request,omitempty" koanf:"encoded_request,omitempty"`
RAWRequest *string `yaml:"raw_request,omitempty" koanf:"raw_request,omitempty"`
OverrideEmptyHostHeader *bool `yaml:"override_empty_host_header,omitempty" koanf:"override_empty_host_header,omitempty"`
}
Overrides represents the overridden inputs that have to be applied to tests