Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Profiles = map[string]Profile{}
Profiles is a map of registered profiles used by test runners
Functions ¶
This section is empty.
Types ¶
type ExpectedInterruption ¶
type ExpectedInterruption struct { RuleID int `yaml:"rule_id,omitempty"` Action string `yaml:"action,omitempty"` Status int `yaml:"status,omitempty"` Data string `yaml:"data,omitempty"` }
ExpectedInterruption contains the expected interruption results for a test
type ExpectedOutput ¶
type ExpectedOutput struct { Headers map[string]string `yaml:"headers,omitempty"` Data interface{} `yaml:"data,omitempty"` // Accepts array or string LogContains string `yaml:"log_contains,omitempty"` NoLogContains string `yaml:"no_log_contains,omitempty"` ExpectError bool `yaml:"expect_error,omitempty"` TriggeredRules []int `yaml:"triggered_rules,omitempty"` NonTriggeredRules []int `yaml:"non_triggered_rules,omitempty"` Status interface{} `yaml:"status,omitempty"` Interruption *ExpectedInterruption `yaml:"interruption,omitempty"` }
ExpectedOutput contains the expected output results for a test
type Meta ¶
type Meta struct { Author string `yaml:"author,omitempty"` Description string `yaml:"description,omitempty"` Enabled bool `yaml:"enabled,omitempty"` Name string `yaml:"name,omitempty"` }
Meta contains the test metadata
type Profile ¶
type Profile struct { Rules string `yaml:"rules,omitempty"` Pass bool `yaml:"pass,omitempty"` Meta Meta `yaml:"meta,omitempty"` Tests []Test `yaml:"tests,omitempty"` }
Profile represents a test profile It contains metadata and instructions for a test It requires more documentation
func RegisterProfile ¶
RegisterProfile registers a profile for running from tests
type Stage ¶
type Stage struct {
Stage SubStage `yaml:"stage,omitempty"`
}
Stage is a yaml container for the stage key it contains ProfileSubStages
type StageInput ¶
type StageInput struct { DestAddr string `yaml:"dest_addr,omitempty"` Port int `yaml:"port,omitempty"` Method string `yaml:"method,omitempty"` URI string `yaml:"uri,omitempty"` Version string `yaml:"version,omitempty"` Data string `yaml:"data,omitempty"` // Accepts array or string Headers map[string]string `yaml:"headers,omitempty"` RawRequest []byte `yaml:"raw_request,omitempty"` EncodedRequest string `yaml:"encoded_request,omitempty"` StopMagic bool `yaml:"stop_magic,omitempty"` }
StageInput contains the input data for tests
type SubStage ¶
type SubStage struct { Input StageInput `yaml:"input,omitempty"` Output ExpectedOutput `yaml:"output,omitempty"` }
SubStage contains the input data and expected output for tests
Click to show internal directories.
Click to hide internal directories.