Bump github.com/onsi/ginkgo from 1.16.1 to 1.16.2

Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.16.1 to 1.16.2.
- [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.16.1...v1.16.2)

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2021-05-05 13:35:02 +00:00
committed by GitHub
parent a278195af3
commit 4b427df80c
7 changed files with 66 additions and 4 deletions

2
go.mod
View File

@ -42,7 +42,7 @@ require (
github.com/mattn/go-colorable v0.1.8 // indirect github.com/mattn/go-colorable v0.1.8 // indirect
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 github.com/moby/term v0.0.0-20201216013528-df9cb8a40635
github.com/mrunalp/fileutils v0.5.0 github.com/mrunalp/fileutils v0.5.0
github.com/onsi/ginkgo v1.16.1 github.com/onsi/ginkgo v1.16.2
github.com/onsi/gomega v1.11.0 github.com/onsi/gomega v1.11.0
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

3
go.sum
View File

@ -610,8 +610,9 @@ github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.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/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg= github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg=
github.com/onsi/ginkgo v1.16.1 h1:foqVmeWDD6yYpK+Yz3fHyNIxFYNxswxqNFjSKe+vI54=
github.com/onsi/ginkgo v1.16.1/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.1/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E=
github.com/onsi/ginkgo v1.16.2 h1:HFB2fbVIlhIfCfOW81bZFbiC/RvnpXSdhbF2/DJr134=
github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E=
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 v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=

View File

@ -1,3 +1,8 @@
## 1.16.2
### Fixes
- Deprecations can be suppressed by setting an `ACK_GINKGO_DEPRECATIONS=<semver>` environment variable.
## 1.16.1 ## 1.16.1
### Fixes ### Fixes

View File

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

View File

@ -61,6 +61,7 @@ func (r *SpecRunner) RunSpecs(args []string, additionalArgs []string) {
deprecationTracker.TrackDeprecation(types.Deprecation{ deprecationTracker.TrackDeprecation(types.Deprecation{
Message: "--stream is deprecated and will be removed in Ginkgo 2.0", Message: "--stream is deprecated and will be removed in Ginkgo 2.0",
DocLink: "removed--stream", DocLink: "removed--stream",
Version: "1.16.0",
}) })
} }
@ -68,6 +69,7 @@ func (r *SpecRunner) RunSpecs(args []string, additionalArgs []string) {
deprecationTracker.TrackDeprecation(types.Deprecation{ deprecationTracker.TrackDeprecation(types.Deprecation{
Message: "--notify is deprecated and will be removed in Ginkgo 2.0", Message: "--notify is deprecated and will be removed in Ginkgo 2.0",
DocLink: "removed--notify", DocLink: "removed--notify",
Version: "1.16.0",
}) })
} }

View File

@ -1,12 +1,19 @@
package types package types
import ( import (
"os"
"strconv"
"strings"
"unicode"
"github.com/onsi/ginkgo/config"
"github.com/onsi/ginkgo/formatter" "github.com/onsi/ginkgo/formatter"
) )
type Deprecation struct { type Deprecation struct {
Message string Message string
DocLink string DocLink string
Version string
} }
type deprecations struct{} type deprecations struct{}
@ -17,6 +24,7 @@ func (d deprecations) CustomReporter() Deprecation {
return Deprecation{ return Deprecation{
Message: "You are using a custom reporter. Support for custom reporters will likely be removed in V2. Most users were using them to generate junit or teamcity reports and this functionality will be merged into the core reporter. In addition, Ginkgo 2.0 will support emitting a JSON-formatted report that users can then manipulate to generate custom reports.\n\n{{red}}{{bold}}If this change will be impactful to you please leave a comment on {{cyan}}{{underline}}https://github.com/onsi/ginkgo/issues/711{{/}}", Message: "You are using a custom reporter. Support for custom reporters will likely be removed in V2. Most users were using them to generate junit or teamcity reports and this functionality will be merged into the core reporter. In addition, Ginkgo 2.0 will support emitting a JSON-formatted report that users can then manipulate to generate custom reports.\n\n{{red}}{{bold}}If this change will be impactful to you please leave a comment on {{cyan}}{{underline}}https://github.com/onsi/ginkgo/issues/711{{/}}",
DocLink: "removed-custom-reporters", DocLink: "removed-custom-reporters",
Version: "1.16.0",
} }
} }
@ -24,6 +32,7 @@ func (d deprecations) V1Reporter() Deprecation {
return Deprecation{ return Deprecation{
Message: "You are using a V1 Ginkgo Reporter. Please update your custom reporter to the new V2 Reporter interface.", Message: "You are using a V1 Ginkgo Reporter. Please update your custom reporter to the new V2 Reporter interface.",
DocLink: "changed-reporter-interface", DocLink: "changed-reporter-interface",
Version: "1.16.0",
} }
} }
@ -31,6 +40,7 @@ func (d deprecations) Async() Deprecation {
return Deprecation{ return Deprecation{
Message: "You are passing a Done channel to a test node to test asynchronous behavior. This is deprecated in Ginkgo V2. Your test will run synchronously and the timeout will be ignored.", Message: "You are passing a Done channel to a test node to test asynchronous behavior. This is deprecated in Ginkgo V2. Your test will run synchronously and the timeout will be ignored.",
DocLink: "removed-async-testing", DocLink: "removed-async-testing",
Version: "1.16.0",
} }
} }
@ -38,6 +48,7 @@ func (d deprecations) Measure() Deprecation {
return Deprecation{ return Deprecation{
Message: "Measure is deprecated in Ginkgo V2", Message: "Measure is deprecated in Ginkgo V2",
DocLink: "removed-measure", DocLink: "removed-measure",
Version: "1.16.0",
} }
} }
@ -45,12 +56,14 @@ func (d deprecations) Convert() Deprecation {
return Deprecation{ return Deprecation{
Message: "The convert command is deprecated in Ginkgo V2", Message: "The convert command is deprecated in Ginkgo V2",
DocLink: "removed-ginkgo-convert", DocLink: "removed-ginkgo-convert",
Version: "1.16.0",
} }
} }
func (d deprecations) Blur() Deprecation { func (d deprecations) Blur() Deprecation {
return Deprecation{ return Deprecation{
Message: "The blur command is deprecated in Ginkgo V2. Use 'ginkgo unfocus' instead.", Message: "The blur command is deprecated in Ginkgo V2. Use 'ginkgo unfocus' instead.",
Version: "1.16.0",
} }
} }
@ -65,6 +78,15 @@ func NewDeprecationTracker() *DeprecationTracker {
} }
func (d *DeprecationTracker) TrackDeprecation(deprecation Deprecation, cl ...CodeLocation) { func (d *DeprecationTracker) TrackDeprecation(deprecation Deprecation, cl ...CodeLocation) {
ackVersion := os.Getenv("ACK_GINKGO_DEPRECATIONS")
if deprecation.Version != "" && ackVersion != "" {
ack := ParseSemVer(ackVersion)
version := ParseSemVer(deprecation.Version)
if ack.GreaterThanOrEqualTo(version) {
return
}
}
if len(cl) == 1 { if len(cl) == 1 {
d.deprecations[deprecation] = append(d.deprecations[deprecation], cl[0]) d.deprecations[deprecation] = append(d.deprecations[deprecation], cl[0])
} else { } else {
@ -92,5 +114,37 @@ func (d *DeprecationTracker) DeprecationsReport() string {
out += formatter.Fi(2, "{{gray}}%s{{/}}\n", location) out += formatter.Fi(2, "{{gray}}%s{{/}}\n", location)
} }
} }
out += formatter.F("\n{{gray}}To silence deprecations that can be silenced set the following environment variable:{{/}}\n")
out += formatter.Fi(1, "{{gray}}ACK_GINKGO_DEPRECATIONS=%s{{/}}\n", config.VERSION)
return out
}
type SemVer struct {
Major int
Minor int
Patch int
}
func (s SemVer) GreaterThanOrEqualTo(o SemVer) bool {
return (s.Major > o.Major) ||
(s.Major == o.Major && s.Minor > o.Minor) ||
(s.Major == o.Major && s.Minor == o.Minor && s.Patch >= o.Patch)
}
func ParseSemVer(semver string) SemVer {
out := SemVer{}
semver = strings.TrimFunc(semver, func(r rune) bool {
return !(unicode.IsNumber(r) || r == '.')
})
components := strings.Split(semver, ".")
if len(components) > 0 {
out.Major, _ = strconv.Atoi(components[0])
}
if len(components) > 1 {
out.Minor, _ = strconv.Atoi(components[1])
}
if len(components) > 2 {
out.Patch, _ = strconv.Atoi(components[2])
}
return out return out
} }

2
vendor/modules.txt vendored
View File

@ -447,7 +447,7 @@ 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.16.1 # github.com/onsi/ginkgo v1.16.2
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