Documentation ¶
Index ¶
- type FTWCheck
- func (c *FTWCheck) AssertExpectError(err error) bool
- func (c *FTWCheck) AssertLogContains() bool
- func (c *FTWCheck) AssertNoLogContains() bool
- func (c *FTWCheck) AssertResponseContains(response string) bool
- func (c *FTWCheck) AssertStatus(status int) bool
- func (c *FTWCheck) CloudMode() bool
- func (c *FTWCheck) ForcedFail(id string) bool
- func (c *FTWCheck) ForcedIgnore(id string) bool
- func (c *FTWCheck) ForcedPass(id string) bool
- func (c *FTWCheck) LogContainsRequired() bool
- func (c *FTWCheck) NoLogContainsRequired() bool
- func (c *FTWCheck) ResponseContainsRequired() bool
- func (c *FTWCheck) SetCloudMode()
- func (c *FTWCheck) SetEndMarker(marker []byte)
- func (c *FTWCheck) SetExpectError(expect bool)
- func (c *FTWCheck) SetExpectResponse(response string)
- func (c *FTWCheck) SetExpectStatus(s []int)
- func (c *FTWCheck) SetExpectTestOutput(t *test.Output)
- func (c *FTWCheck) SetLogContains(contains string)
- func (c *FTWCheck) SetNoLogContains(contains string)
- func (c *FTWCheck) SetStartMarker(marker []byte)
- func (c *FTWCheck) StatusCodeRequired() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FTWCheck ¶
type FTWCheck struct {
// contains filtered or unexported fields
}
FTWCheck is the base struct for checking test results
func NewCheck ¶
func NewCheck(c *config.FTWConfiguration) (*FTWCheck, error)
NewCheck creates a new FTWCheck, allowing to inject the configuration
func (*FTWCheck) AssertExpectError ¶
AssertExpectError helper to check if this error was expected or not
func (*FTWCheck) AssertLogContains ¶
AssertLogContains returns true when the logs contain the string
func (*FTWCheck) AssertNoLogContains ¶
AssertNoLogContains returns true is the string is not found in the logs
func (*FTWCheck) AssertResponseContains ¶
AssertResponseContains checks that the http response contains the needle
func (*FTWCheck) AssertStatus ¶
AssertStatus will match the expected status list with the one received in the response
func (*FTWCheck) ForcedFail ¶
ForcedFail check if this id need to be ignored from results
func (*FTWCheck) ForcedIgnore ¶
ForcedIgnore check if this id need to be ignored from results
func (*FTWCheck) ForcedPass ¶
ForcedPass check if this id need to be ignored from results
func (*FTWCheck) LogContainsRequired ¶ added in v0.4.8
LogContainsRequired checks that the test requires log_contains
func (*FTWCheck) NoLogContainsRequired ¶ added in v0.4.8
NoLogContainsRequired checks that the test requires no_log_contains
func (*FTWCheck) ResponseContainsRequired ¶ added in v0.4.8
ResponseContainsRequired checks that the test requires to check the response
func (*FTWCheck) SetCloudMode ¶
func (c *FTWCheck) SetCloudMode()
SetCloudMode alters the values for expected logs and status code
func (*FTWCheck) SetEndMarker ¶
SetEndMarker sets the log line that marks the end of the logs to analyze
func (*FTWCheck) SetExpectError ¶
SetExpectError sets the boolean if we are expecting an error from the server
func (*FTWCheck) SetExpectResponse ¶
SetExpectResponse sets the response we expect in the text from the server
func (*FTWCheck) SetExpectStatus ¶
SetExpectStatus sets to expect the HTTP status from the test to be in the integer range passed
func (*FTWCheck) SetExpectTestOutput ¶
SetExpectTestOutput sets the combined expected output from this test
func (*FTWCheck) SetLogContains ¶
SetLogContains sets the string to look for in logs
func (*FTWCheck) SetNoLogContains ¶
SetNoLogContains sets the string to look that should not present in logs
func (*FTWCheck) SetStartMarker ¶
SetStartMarker sets the log line that marks the start of the logs to analyze
func (*FTWCheck) StatusCodeRequired ¶ added in v0.4.8
StatusCodeRequired checks that the test requires to check the returned status code