Update go dependencies

This commit is contained in:
Manuel de Brito Fontes 2018-09-22 14:54:24 -03:00
parent 55ccaf4be3
commit 2882fb5ebe
457 changed files with 54614 additions and 19833 deletions

View file

@ -11,6 +11,7 @@ package reporters
import (
"encoding/xml"
"fmt"
"math"
"os"
"strings"
@ -24,6 +25,7 @@ type JUnitTestSuite struct {
Name string `xml:"name,attr"`
Tests int `xml:"tests,attr"`
Failures int `xml:"failures,attr"`
Errors int `xml:"errors,attr"`
Time float64 `xml:"time,attr"`
}
@ -119,8 +121,9 @@ func (reporter *JUnitReporter) SpecDidComplete(specSummary *types.SpecSummary) {
func (reporter *JUnitReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) {
reporter.suite.Tests = summary.NumberOfSpecsThatWillBeRun
reporter.suite.Time = summary.RunTime.Seconds()
reporter.suite.Time = math.Trunc(summary.RunTime.Seconds() * 1000 / 1000)
reporter.suite.Failures = summary.NumberOfFailedSpecs
reporter.suite.Errors = 0
file, err := os.Create(reporter.filename)
if err != nil {
fmt.Printf("Failed to create JUnit report file: %s\n\t%s", reporter.filename, err.Error())

View file

@ -12,7 +12,6 @@ import (
"runtime"
"strings"
"github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable"
"github.com/onsi/ginkgo/types"
)
@ -62,7 +61,7 @@ type Stenographer interface {
SummarizeFailures(summaries []*types.SpecSummary)
}
func New(color bool, enableFlakes bool) Stenographer {
func New(color bool, enableFlakes bool, writer io.Writer) Stenographer {
denoter := "•"
if runtime.GOOS == "windows" {
denoter = "+"
@ -72,7 +71,7 @@ func New(color bool, enableFlakes bool) Stenographer {
denoter: denoter,
cursorState: cursorStateTop,
enableFlakes: enableFlakes,
w: colorable.NewColorableStdout(),
w: writer,
}
}