Documentation ¶
Index ¶
- Constants
- func ConnectDB(host, port, user, password, dbname, sslmode string) *sql.DB
- func Flaky(runs ...[]byte) []string
- func FlakyFile(files ...string) []string
- func GetRun(db *sql.DB, buildID int64) *sql.Row
- func GetTests(db *sql.DB, created time.Time) (*sql.Rows, error)
- func InsertRun(db *sql.DB, run TestRun) (sql.Result, error)
- func InsertTests(db *sql.DB, created time.Time, testResults []TestResult) (sql.Result, error)
- func Parse(output []byte) [][]string
- func ParseFailed(output []byte) []string
- func ParseFile(path string) [][]string
- func ParseFileFailed(path string) []string
- func ReplaceSQL(old, searchPattern string) string
- type TestResult
- type TestRun
Constants ¶
View Source
const (
// ResultsPattern provides the REGEX pattern to find all package output
ResultsPattern = `((FAIL|ok|\?)\s+([\w\.\/\-]+)\s+([0-9s\.]+|\[build failed\]|\[no test files\])(\n|\s+coverage\:\s+([\d\.]+)\%\s+))`
)
Variables ¶
This section is empty.
Functions ¶
func Flaky ¶
Flaky reviews test output from multiple attempts and identifies potentially flaky packages
func InsertTests ¶
InsertTests adds test results to database
func ParseFailed ¶
ParseFailed iterates over test output for failed packages
func ParseFileFailed ¶
ParseFileFailed reads a file to Parse() failed packages
func ReplaceSQL ¶
ReplaceSQL replaces the instance occurrence of any string pattern with an increasing $n based sequence
Types ¶
Click to show internal directories.
Click to hide internal directories.