Documentation ¶
Overview ¶
Package utils provides shared common functions so different E2E tests suites can use them.
Index ¶
- Constants
- func AppendLog(ls LogsTestSuite, logFileName, content string, recurrence int)
- func CheckLogFilePresence(ls LogsTestSuite, logFileName string)
- func CheckLogsExpected(ls LogsTestSuite, service, content string, expectedTags ddtags)
- func CheckLogsNotExpected(ls LogsTestSuite, service, content string)
- func CleanUp(ls LogsTestSuite)
- func FetchAndFilterLogs(ls LogsTestSuite, service, content string) ([]*aggregator.Log, error)
- type LogsTestSuite
Constants ¶
const LinuxLogsFolderPath = "/var/log/e2e_test_logs"
LinuxLogsFolderPath is the folder where log files will be stored for Linux tests
const WindowsLogsFolderPath = "C:\\logs\\e2e_test_logs"
WindowsLogsFolderPath is the folder where log files will be stored for Windows tests
Variables ¶
This section is empty.
Functions ¶
func AppendLog ¶
func AppendLog(ls LogsTestSuite, logFileName, content string, recurrence int)
AppendLog append log with 'content', which is then repeated 'reccurrence' times and verifies log contents.
func CheckLogFilePresence ¶
func CheckLogFilePresence(ls LogsTestSuite, logFileName string)
CheckLogFilePresence verifies the presence or absence of a log file path
func CheckLogsExpected ¶ added in v0.52.0
func CheckLogsExpected(ls LogsTestSuite, service, content string, expectedTags ddtags)
CheckLogsExpected verifies the presence of expected logs.
func CheckLogsNotExpected ¶ added in v0.52.0
func CheckLogsNotExpected(ls LogsTestSuite, service, content string)
CheckLogsNotExpected verifies the absence of unexpected logs.
func CleanUp ¶
func CleanUp(ls LogsTestSuite)
CleanUp cleans up any existing log files (only useful when running dev mode/local runs).
func FetchAndFilterLogs ¶ added in v0.52.0
func FetchAndFilterLogs(ls LogsTestSuite, service, content string) ([]*aggregator.Log, error)
FetchAndFilterLogs fetches and filters logs based on the service.
Types ¶
type LogsTestSuite ¶
type LogsTestSuite interface { T() *testing.T Env() *environments.Host IsDevMode() bool }
LogsTestSuite is an interface for the log agent test suite.