Merge pull request #9658 from containers/dependabot/go_modules/github.com/onsi/ginkgo-1.15.1

Bump github.com/onsi/ginkgo from 1.15.0 to 1.15.1
This commit is contained in:
OpenShift Merge Robot 2021-03-08 08:33:53 -05:00 committed by GitHub
commit 6fe634c916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 129 additions and 100 deletions

2
go.mod
View File

@ -40,7 +40,7 @@ require (
github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf
github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618 github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/onsi/ginkgo v1.15.0 github.com/onsi/ginkgo v1.15.1
github.com/onsi/gomega v1.10.5 github.com/onsi/gomega v1.10.5
github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6 github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6

4
go.sum
View File

@ -420,6 +420,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWb
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
@ -432,6 +434,8 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108
github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/ginkgo v1.15.0 h1:1V1NfVQR87RtWAgp1lv9JZJ5Jap+XFGKPi00andXGi4= github.com/onsi/ginkgo v1.15.0 h1:1V1NfVQR87RtWAgp1lv9JZJ5Jap+XFGKPi00andXGi4=
github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg= github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg=
github.com/onsi/ginkgo v1.15.1 h1:DsXNrKujDlkMS9Rsxmd+Fg7S6Kc5lhE+qX8tY6laOxc=
github.com/onsi/ginkgo v1.15.1/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o=
github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=

View File

@ -1,2 +1,3 @@
.idea/ .idea/
.test/ .test/
examples/_*

View File

@ -1,16 +0,0 @@
language: go
script:
- go test -race -v ./...
go:
- "1.9"
- "1.10"
- "1.11"
- "1.12"
- "1.13"
- tip
matrix:
allow_failures:
- go: tip

View File

@ -1,4 +1,14 @@
# Version v1.4.4 # Version v1.4.7-v1.4.8
* Documentation updates.
* Small linter cleanups.
* Added example in test.
# Version v1.4.6
* Document the usage of Cleanup when re-reading a file (thanks to @lesovsky) for issue #18.
* Add example directories with example and tests for issues.
# Version v1.4.4-v1.4.5
* Fix of checksum problem because of forced tag. No changes to the code. * Fix of checksum problem because of forced tag. No changes to the code.

View File

@ -1,36 +1,44 @@
[![Build Status](https://travis-ci.org/nxadm/tail.svg?branch=master)](https://travis-ci.org/nxadm/tail) ![ci](https://github.com/nxadm/tail/workflows/ci/badge.svg)[![Go Reference](https://pkg.go.dev/badge/github.com/nxadm/tail.svg)](https://pkg.go.dev/github.com/nxadm/tail)
This is repo is forked from the dormant upstream repo at # tail functionality in Go
[hpcloud](https://github.com/hpcloud/tail). This fork adds support for go
modules, updates the dependencies, adds features and fixes bugs. Go 1.9 is
the oldest compiler release supported.
# Go package for tail-ing files nxadm/tail provides a Go library that emulates the features of the BSD `tail`
program. The library comes with full support for truncation/move detection as
it is designed to work with log rotation tools. The library works on all
operating systems supported by Go, including POSIX systems like Linux and
*BSD, and MS Windows. Go 1.9 is the oldest compiler release supported.
A Go package striving to emulate the features of the BSD `tail` program. A simple example:
```Go ```Go
t, err := tail.TailFile("/var/log/nginx.log", tail.Config{Follow: true}) // Create a tail
t, err := tail.TailFile(
"/var/log/nginx.log", tail.Config{Follow: true, ReOpen: true})
if err != nil { if err != nil {
panic(err) panic(err)
} }
// Print the text of each received line
for line := range t.Lines { for line := range t.Lines {
fmt.Println(line.Text) fmt.Println(line.Text)
} }
``` ```
See [API documentation](http://godoc.org/github.com/nxadm/tail). See [API documentation](https://pkg.go.dev/github.com/nxadm/tail).
## Log rotation
Tail comes with full support for truncation/move detection as it is
designed to work with log rotation tools.
## Installing ## Installing
go get github.com/nxadm/tail/... go get github.com/nxadm/tail/...
## Windows support ## History
This package [needs assistance](https://github.com/nxadm/tail/labels/Windows) for full Windows support. This project is an active, drop-in replacement for the
[abandoned](https://en.wikipedia.org/wiki/HPE_Helion) Go tail library at
[hpcloud](https://github.com/hpcloud/tail). Next to
[addressing open issues/PRs of the original project](https://github.com/nxadm/tail/issues/6),
nxadm/tail continues the development by keeping up to date with the Go toolchain
(e.g. go modules) and dependencies, completing the documentation, adding features
and fixing bugs.
## Examples
Examples, e.g. used to debug an issue, are kept in the [examples directory](/examples).

View File

@ -1,11 +0,0 @@
version: 0.{build}
skip_tags: true
cache: C:\Users\appveyor\AppData\Local\NuGet\Cache
build_script:
- SET GOPATH=c:\workspace
- go test -v -race ./...
test: off
clone_folder: c:\workspace\src\github.com\nxadm\tail
branches:
only:
- master

View File

@ -3,7 +3,6 @@ module github.com/nxadm/tail
go 1.13 go 1.13
require ( require (
github.com/fsnotify/fsnotify v1.4.7 github.com/fsnotify/fsnotify v1.4.9
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
) )

View File

@ -1,6 +1,6 @@
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd h1:DBH9mDw0zluJT/R+nGuV3jWFWLFaHyYZWD4tOT+cjn0= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9 h1:L2auWcuQIvxz9xSEqzESnV/QN/gNRXNApHi3fYwl2w0=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=

67
vendor/github.com/nxadm/tail/tail.go generated vendored
View File

@ -1,6 +1,12 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2015 HPE Software Inc. All rights reserved. // Copyright (c) 2015 HPE Software Inc. All rights reserved.
// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. // Copyright (c) 2013 ActiveState Software Inc. All rights reserved.
//nxadm/tail provides a Go library that emulates the features of the BSD `tail`
//program. The library comes with full support for truncation/move detection as
//it is designed to work with log rotation tools. The library works on all
//operating systems supported by Go, including POSIX systems like Linux and
//*BSD, and MS Windows. Go 1.9 is the oldest compiler release supported.
package tail package tail
import ( import (
@ -22,26 +28,31 @@ import (
) )
var ( var (
// ErrStop is returned when the tail of a file has been marked to be stopped.
ErrStop = errors.New("tail should now stop") ErrStop = errors.New("tail should now stop")
) )
type Line struct { type Line struct {
Text string Text string // The contents of the file
Num int Num int // The line number
SeekInfo SeekInfo SeekInfo SeekInfo // SeekInfo
Time time.Time Time time.Time // Present time
Err error // Error from tail Err error // Error from tail
} }
// NewLine returns a Line with present time. // Deprecated: this function is no longer used internally and it has little of no
// use in the API. As such, it will be removed from the API in a future major
// release.
//
// NewLine returns a * pointer to a Line struct.
func NewLine(text string, lineNum int) *Line { func NewLine(text string, lineNum int) *Line {
return &Line{text, lineNum, SeekInfo{}, time.Now(), nil} return &Line{text, lineNum, SeekInfo{}, time.Now(), nil}
} }
// SeekInfo represents arguments to `io.Seek` // SeekInfo represents arguments to io.Seek. See: https://golang.org/pkg/io/#SectionReader.Seek
type SeekInfo struct { type SeekInfo struct {
Offset int64 Offset int64
Whence int // io.Seek* Whence int
} }
type logger interface { type logger interface {
@ -59,26 +70,28 @@ type logger interface {
// Config is used to specify how a file must be tailed. // Config is used to specify how a file must be tailed.
type Config struct { type Config struct {
// File-specifc // File-specifc
Location *SeekInfo // Seek to this location before tailing Location *SeekInfo // Tail from this location. If nil, start at the beginning of the file
ReOpen bool // Reopen recreated files (tail -F) ReOpen bool // Reopen recreated files (tail -F)
MustExist bool // Fail early if the file does not exist MustExist bool // Fail early if the file does not exist
Poll bool // Poll for file changes instead of using inotify Poll bool // Poll for file changes instead of using the default inotify
Pipe bool // Is a named pipe (mkfifo) Pipe bool // The file is a named pipe (mkfifo)
RateLimiter *ratelimiter.LeakyBucket
// Generic IO // Generic IO
Follow bool // Continue looking for new lines (tail -f) Follow bool // Continue looking for new lines (tail -f)
MaxLineSize int // If non-zero, split longer lines into multiple lines MaxLineSize int // If non-zero, split longer lines into multiple lines
// Logger, when nil, is set to tail.DefaultLogger // Optionally, use a ratelimiter (e.g. created by the ratelimiter/NewLeakyBucket function)
// To disable logging: set field to tail.DiscardingLogger RateLimiter *ratelimiter.LeakyBucket
// Optionally use a Logger. When nil, the Logger is set to tail.DefaultLogger.
// To disable logging, set it to tail.DiscardingLogger
Logger logger Logger logger
} }
type Tail struct { type Tail struct {
Filename string Filename string // The filename
Lines chan *Line Lines chan *Line // A consumable channel of *Line
Config Config // Tail.Configuration
file *os.File file *os.File
reader *bufio.Reader reader *bufio.Reader
@ -93,16 +106,17 @@ type Tail struct {
} }
var ( var (
// DefaultLogger is used when Config.Logger == nil // DefaultLogger logs to os.Stderr and it is used when Config.Logger == nil
DefaultLogger = log.New(os.Stderr, "", log.LstdFlags) DefaultLogger = log.New(os.Stderr, "", log.LstdFlags)
// DiscardingLogger can be used to disable logging output // DiscardingLogger can be used to disable logging output
DiscardingLogger = log.New(ioutil.Discard, "", 0) DiscardingLogger = log.New(ioutil.Discard, "", 0)
) )
// TailFile begins tailing the file. Output stream is made available // TailFile begins tailing the file. And returns a pointer to a Tail struct
// via the `Tail.Lines` channel. To handle errors during tailing, // and an error. An output stream is made available via the Tail.Lines
// invoke the `Wait` or `Err` method after finishing reading from the // channel (e.g. to be looped and printed). To handle errors during tailing,
// `Lines` channel. // after finishing reading from the Lines channel, invoke the `Wait` or `Err`
// method on the returned *Tail.
func TailFile(filename string, config Config) (*Tail, error) { func TailFile(filename string, config Config) (*Tail, error) {
if config.ReOpen && !config.Follow { if config.ReOpen && !config.Follow {
util.Fatal("cannot set ReOpen without Follow.") util.Fatal("cannot set ReOpen without Follow.")
@ -138,10 +152,9 @@ func TailFile(filename string, config Config) (*Tail, error) {
return t, nil return t, nil
} }
// Tell returns the file's current position, like stdio's ftell(). // Tell returns the file's current position, like stdio's ftell() and an error.
// But this value is not very accurate. // Beware that this value may not be completely accurate because one line from
// One line from the chan(tail.Lines) may have been read, // the chan(tail.Lines) may have been read already.
// so it may have lost one line.
func (tail *Tail) Tell() (offset int64, err error) { func (tail *Tail) Tell() (offset int64, err error) {
if tail.file == nil { if tail.file == nil {
return return
@ -167,7 +180,8 @@ func (tail *Tail) Stop() error {
return tail.Wait() return tail.Wait()
} }
// StopAtEOF stops tailing as soon as the end of the file is reached. // StopAtEOF stops tailing as soon as the end of the file is reached. The function
// returns an error,
func (tail *Tail) StopAtEOF() error { func (tail *Tail) StopAtEOF() error {
tail.Kill(errStopAtEOF) tail.Kill(errStopAtEOF)
return tail.Wait() return tail.Wait()
@ -435,6 +449,7 @@ func (tail *Tail) sendLine(line string) bool {
// Cleanup removes inotify watches added by the tail package. This function is // Cleanup removes inotify watches added by the tail package. This function is
// meant to be invoked from a process's exit handler. Linux kernel may not // meant to be invoked from a process's exit handler. Linux kernel may not
// automatically remove inotify watches after the process exits. // automatically remove inotify watches after the process exits.
// If you plan to re-read a file, don't call Cleanup in between.
func (tail *Tail) Cleanup() { func (tail *Tail) Cleanup() {
watch.Cleanup(tail.Filename) watch.Cleanup(tail.Filename)
} }

View File

@ -1,3 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// +build !windows // +build !windows
package tail package tail
@ -6,6 +7,11 @@ import (
"os" "os"
) )
// Deprecated: this function is only useful internally and, as such,
// it will be removed from the API in a future major release.
//
// OpenFile proxies a os.Open call for a file so it can be correctly tailed
// on POSIX and non-POSIX OSes like MS Windows.
func OpenFile(name string) (file *os.File, err error) { func OpenFile(name string) (file *os.File, err error) {
return os.Open(name) return os.Open(name)
} }

View File

@ -1,12 +1,19 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// +build windows // +build windows
package tail package tail
import ( import (
"github.com/nxadm/tail/winfile"
"os" "os"
"github.com/nxadm/tail/winfile"
) )
// Deprecated: this function is only useful internally and, as such,
// it will be removed from the API in a future major release.
//
// OpenFile proxies a os.Open call for a file so it can be correctly tailed
// on POSIX and non-POSIX OSes like MS Windows.
func OpenFile(name string) (file *os.File, err error) { func OpenFile(name string) (file *os.File, err error) {
return winfile.OpenFile(name, os.O_RDONLY, 0) return winfile.OpenFile(name, os.O_RDONLY, 0)
} }

View File

@ -1,3 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2015 HPE Software Inc. All rights reserved. // Copyright (c) 2015 HPE Software Inc. All rights reserved.
// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. // Copyright (c) 2013 ActiveState Software Inc. All rights reserved.

View File

@ -1,3 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
package watch package watch
type FileChanges struct { type FileChanges struct {

View File

@ -1,3 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2015 HPE Software Inc. All rights reserved. // Copyright (c) 2015 HPE Software Inc. All rights reserved.
// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. // Copyright (c) 2013 ActiveState Software Inc. All rights reserved.

View File

@ -1,3 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2015 HPE Software Inc. All rights reserved. // Copyright (c) 2015 HPE Software Inc. All rights reserved.
// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. // Copyright (c) 2013 ActiveState Software Inc. All rights reserved.

View File

@ -1,3 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2015 HPE Software Inc. All rights reserved. // Copyright (c) 2015 HPE Software Inc. All rights reserved.
// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. // Copyright (c) 2013 ActiveState Software Inc. All rights reserved.

View File

@ -1,3 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2015 HPE Software Inc. All rights reserved. // Copyright (c) 2015 HPE Software Inc. All rights reserved.
// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. // Copyright (c) 2013 ActiveState Software Inc. All rights reserved.

View File

@ -1,3 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// +build windows // +build windows
package winfile package winfile

View File

@ -1,8 +1,8 @@
language: go language: go
go: go:
- 1.14.x
- 1.15.x
- tip - tip
- 1.16.x
- 1.15.x
cache: cache:
directories: directories:

View File

@ -1,3 +1,8 @@
## 1.15.1
### Fixes
- reporters/junit: Use `system-out` element instead of `passed` (#769) [9eda305]
## 1.15.0 ## 1.15.0
### Features ### Features

View File

@ -1,6 +1,7 @@
![Ginkgo: A Go BDD Testing Framework](https://onsi.github.io/ginkgo/images/ginkgo.png) ![Ginkgo: A Go BDD Testing Framework](https://onsi.github.io/ginkgo/images/ginkgo.png)
[![Build Status](https://travis-ci.org/onsi/ginkgo.svg?branch=master)](https://travis-ci.org/onsi/ginkgo) [![Build Status](https://travis-ci.org/onsi/ginkgo.svg?branch=master)](https://travis-ci.org/onsi/ginkgo)
[![test](https://github.com/onsi/ginkgo/workflows/test/badge.svg?branch=master)](https://github.com/onsi/ginkgo/actions?query=workflow%3Atest+branch%3Amaster)
Jump to the [docs](https://onsi.github.io/ginkgo/) | [中文文档](https://ke-chain.github.io/ginkgodoc) to learn more. To start rolling your Ginkgo tests *now* [keep reading](#set-me-up)! Jump to the [docs](https://onsi.github.io/ginkgo/) | [中文文档](https://ke-chain.github.io/ginkgodoc) to learn more. To start rolling your Ginkgo tests *now* [keep reading](#set-me-up)!

View File

@ -20,7 +20,7 @@ import (
"fmt" "fmt"
) )
const VERSION = "1.15.0" const VERSION = "1.15.1"
type GinkgoConfigType struct { type GinkgoConfigType struct {
RandomSeed int64 RandomSeed int64

View File

@ -1,11 +1,10 @@
module github.com/onsi/ginkgo module github.com/onsi/ginkgo
go 1.15
require ( require (
github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/nxadm/tail v1.4.8
github.com/nxadm/tail v1.4.4
github.com/onsi/gomega v1.10.1 github.com/onsi/gomega v1.10.1
golang.org/x/sys v0.0.0-20210112080510-489259a85091 golang.org/x/sys v0.0.0-20210112080510-489259a85091
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e
) )
go 1.13

View File

@ -14,8 +14,9 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=

View File

@ -33,17 +33,12 @@ type JUnitTestSuite struct {
type JUnitTestCase struct { type JUnitTestCase struct {
Name string `xml:"name,attr"` Name string `xml:"name,attr"`
ClassName string `xml:"classname,attr"` ClassName string `xml:"classname,attr"`
PassedMessage *JUnitPassedMessage `xml:"passed,omitempty"`
FailureMessage *JUnitFailureMessage `xml:"failure,omitempty"` FailureMessage *JUnitFailureMessage `xml:"failure,omitempty"`
Skipped *JUnitSkipped `xml:"skipped,omitempty"` Skipped *JUnitSkipped `xml:"skipped,omitempty"`
Time float64 `xml:"time,attr"` Time float64 `xml:"time,attr"`
SystemOut string `xml:"system-out,omitempty"` SystemOut string `xml:"system-out,omitempty"`
} }
type JUnitPassedMessage struct {
Message string `xml:",chardata"`
}
type JUnitFailureMessage struct { type JUnitFailureMessage struct {
Type string `xml:"type,attr"` Type string `xml:"type,attr"`
Message string `xml:",chardata"` Message string `xml:",chardata"`
@ -114,9 +109,7 @@ func (reporter *JUnitReporter) SpecDidComplete(specSummary *types.SpecSummary) {
ClassName: reporter.testSuiteName, ClassName: reporter.testSuiteName,
} }
if reporter.ReporterConfig.ReportPassed && specSummary.State == types.SpecStatePassed { if reporter.ReporterConfig.ReportPassed && specSummary.State == types.SpecStatePassed {
testCase.PassedMessage = &JUnitPassedMessage{ testCase.SystemOut = specSummary.CapturedOutput
Message: specSummary.CapturedOutput,
}
} }
if specSummary.State == types.SpecStateFailed || specSummary.State == types.SpecStateTimedOut || specSummary.State == types.SpecStatePanicked { if specSummary.State == types.SpecStateFailed || specSummary.State == types.SpecStateTimedOut || specSummary.State == types.SpecStatePanicked {
testCase.FailureMessage = &JUnitFailureMessage{ testCase.FailureMessage = &JUnitFailureMessage{

4
vendor/modules.txt vendored
View File

@ -407,13 +407,13 @@ github.com/morikuni/aec
github.com/mrunalp/fileutils github.com/mrunalp/fileutils
# github.com/mtrmac/gpgme v0.1.2 # github.com/mtrmac/gpgme v0.1.2
github.com/mtrmac/gpgme github.com/mtrmac/gpgme
# github.com/nxadm/tail v1.4.4 # github.com/nxadm/tail v1.4.8
github.com/nxadm/tail github.com/nxadm/tail
github.com/nxadm/tail/ratelimiter github.com/nxadm/tail/ratelimiter
github.com/nxadm/tail/util github.com/nxadm/tail/util
github.com/nxadm/tail/watch github.com/nxadm/tail/watch
github.com/nxadm/tail/winfile github.com/nxadm/tail/winfile
# github.com/onsi/ginkgo v1.15.0 # github.com/onsi/ginkgo v1.15.1
github.com/onsi/ginkgo github.com/onsi/ginkgo
github.com/onsi/ginkgo/config github.com/onsi/ginkgo/config
github.com/onsi/ginkgo/extensions/table github.com/onsi/ginkgo/extensions/table