github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/tools/test_monitor/common/level1.go (about) 1 package common 2 3 import ( 4 "time" 5 6 "github.com/onflow/flow-go/utils/unittest" 7 ) 8 9 type SkippedTestEntry struct { 10 Test string `json:"test"` 11 SkipReason unittest.SkipReason `json:"skip_reason,omitempty"` 12 Package string `json:"package"` 13 CommitDate time.Time `json:"commit_date"` 14 CommitSHA string `json:"commit_sha"` 15 Category string `json:"category"` 16 } 17 18 // RawTestStep models single line from "go test -json" output. 19 type RawTestStep struct { 20 Time time.Time `json:"Time"` 21 Action string `json:"Action"` 22 Package string `json:"Package"` 23 Test string `json:"Test"` 24 Output string `json:"Output"` 25 Elapsed float64 `json:"Elapsed"` 26 } 27 28 // Level1TestResult models result of a single test 29 type Level1TestResult struct { 30 // data that spans multiple tests - it's added at the test level because it will be used 31 // by BigQuery tables and will need to be flattened 32 CommitSha string `json:"commit_sha"` 33 CommitDate time.Time `json:"commit_date"` 34 JobRunDate time.Time `json:"job_run_date"` 35 RunID string `json:"run_id"` 36 37 // test specific data 38 Test string `json:"test"` 39 Package string `json:"package"` 40 Output []string `json:"output,omitempty"` 41 Elapsed float64 `json:"elapsed"` 42 Pass int `json:"pass"` 43 Exception int `json:"exception"` 44 45 Action string `json:"-"` 46 } 47 48 type Level1Summary []Level1TestResult