Update new output tests

This commit is contained in:
Joël Stemmer 2019-10-06 17:44:56 +01:00
parent 51ca01beb2
commit 02fb5c657b

View File

@ -1593,16 +1593,17 @@ func testNewParser(input, reportFile, packageName string, t *testing.T) {
actual := gtr.JUnit(gtr.FromEvents(events, packageName)) actual := gtr.JUnit(gtr.FromEvents(events, packageName))
actual, err := toXML(gtr.JUnit(report)) expectedXML, err := loadTestReport(reportFile, "")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
expected, err := loadTestReport(reportFile, "") var expected junit.Testsuites
if err != nil { if err := xml.Unmarshal([]byte(expectedXML), &expected); err != nil {
t.Fatal(err) t.Fatal(err)
} }
expected.XMLName.Local = ""
if diff := cmp.Diff(actual, expected); diff != "" { if diff := cmp.Diff(actual, expected); diff != "" {
t.Errorf("Unexpected report diff (-got, +want):\n%v", diff) t.Errorf("Unexpected report diff (-got, +want):\n%v", diff)
} }