aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/onsi/ginkgo/reporters
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2019-09-30 12:43:59 +0000
committerValentin Rothberg <rothberg@redhat.com>2019-09-30 15:11:28 +0200
commit427b71f147afd9d624aeb3b7fc6a26b55567d1b7 (patch)
treef0a4a6a102ecfe12ea92ce5e7afe3bd7b62181a8 /vendor/github.com/onsi/ginkgo/reporters
parent01b7af8ee9b3df1439c4da109ba11e7410108dab (diff)
downloadpodman-427b71f147afd9d624aeb3b7fc6a26b55567d1b7.tar.gz
podman-427b71f147afd9d624aeb3b7fc6a26b55567d1b7.tar.bz2
podman-427b71f147afd9d624aeb3b7fc6a26b55567d1b7.zip
Bump github.com/onsi/ginkgo from 1.8.0 to 1.10.1
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.8.0 to 1.10.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v1.8.0...v1.10.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/onsi/ginkgo/reporters')
-rw-r--r--vendor/github.com/onsi/ginkgo/reporters/default_reporter.go3
-rw-r--r--vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go25
-rw-r--r--vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go9
3 files changed, 31 insertions, 6 deletions
diff --git a/vendor/github.com/onsi/ginkgo/reporters/default_reporter.go b/vendor/github.com/onsi/ginkgo/reporters/default_reporter.go
index ac58dd5f7..c76283b46 100644
--- a/vendor/github.com/onsi/ginkgo/reporters/default_reporter.go
+++ b/vendor/github.com/onsi/ginkgo/reporters/default_reporter.go
@@ -62,6 +62,9 @@ func (reporter *DefaultReporter) SpecDidComplete(specSummary *types.SpecSummary)
reporter.stenographer.AnnounceSuccesfulSlowSpec(specSummary, reporter.config.Succinct)
} else {
reporter.stenographer.AnnounceSuccesfulSpec(specSummary)
+ if reporter.config.ReportPassed {
+ reporter.stenographer.AnnounceCapturedOutput(specSummary.CapturedOutput)
+ }
}
case types.SpecStatePending:
reporter.stenographer.AnnouncePendingSpec(specSummary, reporter.config.NoisyPendings && !reporter.config.Succinct)
diff --git a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go b/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go
index 2c9f3c792..89a7c8465 100644
--- a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go
+++ b/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go
@@ -32,12 +32,17 @@ type JUnitTestSuite struct {
type JUnitTestCase struct {
Name string `xml:"name,attr"`
ClassName string `xml:"classname,attr"`
+ PassedMessage *JUnitPassedMessage `xml:"passed,omitempty"`
FailureMessage *JUnitFailureMessage `xml:"failure,omitempty"`
Skipped *JUnitSkipped `xml:"skipped,omitempty"`
Time float64 `xml:"time,attr"`
SystemOut string `xml:"system-out,omitempty"`
}
+type JUnitPassedMessage struct {
+ Message string `xml:",chardata"`
+}
+
type JUnitFailureMessage struct {
Type string `xml:"type,attr"`
Message string `xml:",chardata"`
@@ -48,9 +53,10 @@ type JUnitSkipped struct {
}
type JUnitReporter struct {
- suite JUnitTestSuite
- filename string
- testSuiteName string
+ suite JUnitTestSuite
+ filename string
+ testSuiteName string
+ ReporterConfig config.DefaultReporterConfigType
}
//NewJUnitReporter creates a new JUnit XML reporter. The XML will be stored in the passed in filename.
@@ -60,12 +66,13 @@ func NewJUnitReporter(filename string) *JUnitReporter {
}
}
-func (reporter *JUnitReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) {
+func (reporter *JUnitReporter) SpecSuiteWillBegin(ginkgoConfig config.GinkgoConfigType, summary *types.SuiteSummary) {
reporter.suite = JUnitTestSuite{
Name: summary.SuiteDescription,
TestCases: []JUnitTestCase{},
}
reporter.testSuiteName = summary.SuiteDescription
+ reporter.ReporterConfig = config.DefaultReporterConfig
}
func (reporter *JUnitReporter) SpecWillRun(specSummary *types.SpecSummary) {
@@ -105,11 +112,21 @@ func (reporter *JUnitReporter) SpecDidComplete(specSummary *types.SpecSummary) {
Name: strings.Join(specSummary.ComponentTexts[1:], " "),
ClassName: reporter.testSuiteName,
}
+ if reporter.ReporterConfig.ReportPassed && specSummary.State == types.SpecStatePassed {
+ testCase.PassedMessage = &JUnitPassedMessage{
+ Message: specSummary.CapturedOutput,
+ }
+ }
if specSummary.State == types.SpecStateFailed || specSummary.State == types.SpecStateTimedOut || specSummary.State == types.SpecStatePanicked {
testCase.FailureMessage = &JUnitFailureMessage{
Type: reporter.failureTypeForState(specSummary.State),
Message: failureMessage(specSummary.Failure),
}
+ if specSummary.State == types.SpecStatePanicked {
+ testCase.FailureMessage.Message += fmt.Sprintf("\n\nPanic: %s\n\nFull stack:\n%s",
+ specSummary.Failure.ForwardedPanic,
+ specSummary.Failure.Location.FullStackTrace)
+ }
testCase.SystemOut = specSummary.CapturedOutput
}
if specSummary.State == types.SpecStateSkipped || specSummary.State == types.SpecStatePending {
diff --git a/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go b/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go
index 36ee2a600..c8e27b2a7 100644
--- a/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go
+++ b/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go
@@ -22,8 +22,9 @@ const (
)
type TeamCityReporter struct {
- writer io.Writer
- testSuiteName string
+ writer io.Writer
+ testSuiteName string
+ ReporterConfig config.DefaultReporterConfigType
}
func NewTeamCityReporter(writer io.Writer) *TeamCityReporter {
@@ -65,6 +66,10 @@ func (reporter *TeamCityReporter) SpecWillRun(specSummary *types.SpecSummary) {
func (reporter *TeamCityReporter) SpecDidComplete(specSummary *types.SpecSummary) {
testName := escape(strings.Join(specSummary.ComponentTexts[1:], " "))
+ if reporter.ReporterConfig.ReportPassed && specSummary.State == types.SpecStatePassed {
+ details := escape(specSummary.CapturedOutput)
+ fmt.Fprintf(reporter.writer, "%s[testPassed name='%s' details='%s']", messageId, testName, details)
+ }
if specSummary.State == types.SpecStateFailed || specSummary.State == types.SpecStateTimedOut || specSummary.State == types.SpecStatePanicked {
message := escape(specSummary.Failure.ComponentCodeLocation.String())
details := escape(specSummary.Failure.Message)