From 985100c8e8777c5b3720ac968286d17eec1f9e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Stemmer?= Date: Sun, 20 Mar 2022 00:09:50 +0000 Subject: [PATCH] junit: Move test output within the XML tag for skipped tests For consistency with failed tests and tests with unknown status. --- pkg/junit/junit.go | 3 ++- testdata/03-report.xml | 2 +- testdata/12-report.xml | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/junit/junit.go b/pkg/junit/junit.go index 29fbb90..0ce3503 100644 --- a/pkg/junit/junit.go +++ b/pkg/junit/junit.go @@ -170,7 +170,8 @@ func CreateFromReport(report gtr.Report, hostname string) Testsuites { } } else if test.Result == gtr.Skip { tc.Skipped = &Result{ - Message: formatOutput(test.Output, test.Level), + Message: "Skipped", + Data: formatOutput(test.Output, test.Level), } } else if test.Result == gtr.Unknown { tc.Error = &Result{ diff --git a/testdata/03-report.xml b/testdata/03-report.xml index 4cb4d4a..92c1506 100644 --- a/testdata/03-report.xml +++ b/testdata/03-report.xml @@ -5,7 +5,7 @@ - + diff --git a/testdata/12-report.xml b/testdata/12-report.xml index 619f9a3..b58a8b1 100644 --- a/testdata/12-report.xml +++ b/testdata/12-report.xml @@ -25,11 +25,11 @@ example.go:123: Expected and obtained are different.]]> - + - +