Atlas › Test

functional_test_artifact

Exact test identity: go.temporal.io/server/tools/flakereport/TestParseArtifactName/functional_test_artifact

Package
go.temporal.io/server/tools/flakereport
Suite / test hierarchy
TestParseArtifactName/functional_test_artifact
Test
functional_test_artifact
Introduced at
github.go ×1 Frontier kind: Joint frontier
Covered ranges
6
Covered lines
11
Covered files
1

Covered source

Expand a file to inspect source; the > gutter marks covered lines.

go.temporal.io/server/tools/flakereport/github.go 11 covered LOC · 6 ranges

Open complete file

124 // Unit/integration: junit-xml--{run_id}--{job_id}--{run_attempt}--unit-test
125 // Returns: runID, jobID, matrixName ("unknown" for fields that are absent or unparseable)
126 > func parseArtifactName(artifactName string) (runID string, jobID string, matrixName string) { github.go
127 > parts := strings.Split(artifactName, "--")
128 > if len(parts) < 3 {
129 return "unknown", "unknown", "unknown"
130 }
131
132 > runID = parts[1] github.go
133 >
134 > jobID = parts[2]
135 > if jobID == "" {
136 jobID = "unknown"
137 }
140 // Unit/integration artifacts have only 5 parts where parts[4] is the test type
141 // (e.g. "unit-test"), not a matrix name. Functional artifacts have >=7 parts.
142 > if len(parts) >= 6 { github.go
143 > matrixName = parts[4] github.go
144 > } else { github.go
145 matrixName = "unknown"
146 }
147
148 > return runID, jobID, matrixName github.go
149 }
150