gtr,junit: move creation of JUnit testsuites from gtr to junit

Package gtr shouldn't need to know about the existence of different
output formats like junit.
This commit is contained in:
Joël Stemmer
2022-03-13 15:06:32 +00:00
parent 334044509c
commit a77bfe0f1c
4 changed files with 161 additions and 150 deletions

View File

@ -204,7 +204,8 @@ func testReport(input, reportFile, packageName string, t *testing.T) {
}
testTime := time.Date(2022, 1, 1, 0, 0, 0, 0, time.UTC)
actual := gtr.JUnit(gtr.FromEvents(events, packageName), "hostname", testTime)
report := gtr.FromEvents(events, packageName)
actual := junit.CreateFromReport(report, "hostname", testTime)
expectedXML, err := loadTestReport(reportFile, "")
if err != nil {