mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: bump the github-dependencies group with 2 updates
Bumps the github-dependencies group with 2 updates: [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) and [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo). Updates `github.com/aws/aws-sdk-go` from 1.49.17 to 1.49.21 - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.49.17...v1.49.21) Updates `github.com/onsi/ginkgo/v2` from 2.13.2 to 2.14.0 - [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/v2.13.2...v2.14.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
aa83c4e123
commit
b79dc5df5a
25
vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md
generated
vendored
25
vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md
generated
vendored
@ -1,3 +1,28 @@
|
||||
## 2.14.0
|
||||
|
||||
### Features
|
||||
You can now use `GinkgoTB()` when you need an instance of `testing.TB` to pass to a library.
|
||||
|
||||
Prior to this release table testing only supported generating individual `It`s for each test entry. `DescribeTableSubtree` extends table testing support to entire testing subtrees - under the hood `DescrieTableSubtree` generates a new container for each entry and invokes your function to fill our the container. See the [docs](https://onsi.github.io/ginkgo/#generating-subtree-tables) to learn more.
|
||||
|
||||
- Introduce DescribeTableSubtree [65ec56d]
|
||||
- add GinkgoTB() to docs [4a2c832]
|
||||
- Add GinkgoTB() function (#1333) [92b6744]
|
||||
|
||||
### Fixes
|
||||
- Fix typo in internal/suite.go (#1332) [beb9507]
|
||||
- Fix typo in docs/index.md (#1319) [4ac3a13]
|
||||
- allow wasm to compile with ginkgo present (#1311) [b2e5bc5]
|
||||
|
||||
### Maintenance
|
||||
- Bump golang.org/x/tools from 0.16.0 to 0.16.1 (#1316) [465a8ec]
|
||||
- Bump actions/setup-go from 4 to 5 (#1313) [eab0e40]
|
||||
- Bump github/codeql-action from 2 to 3 (#1317) [fbf9724]
|
||||
- Bump golang.org/x/crypto (#1318) [3ee80ee]
|
||||
- Bump golang.org/x/tools from 0.14.0 to 0.16.0 (#1306) [123e1d5]
|
||||
- Bump github.com/onsi/gomega from 1.29.0 to 1.30.0 (#1297) [558f6e0]
|
||||
- Bump golang.org/x/net from 0.17.0 to 0.19.0 (#1307) [84ff7f3]
|
||||
|
||||
## 2.13.2
|
||||
|
||||
### Fixes
|
||||
|
105
vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go
generated
vendored
105
vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go
generated
vendored
@ -1,7 +1,10 @@
|
||||
package ginkgo
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/onsi/ginkgo/v2/internal/testingtproxy"
|
||||
"github.com/onsi/ginkgo/v2/types"
|
||||
)
|
||||
|
||||
/*
|
||||
@ -15,7 +18,7 @@ correct line number associated with the failure - though you do not need to use
|
||||
You can learn more here: https://onsi.github.io/ginkgo/#using-third-party-libraries
|
||||
*/
|
||||
func GinkgoT(optionalOffset ...int) FullGinkgoTInterface {
|
||||
offset := 3
|
||||
offset := 1
|
||||
if len(optionalOffset) > 0 {
|
||||
offset = optionalOffset[0]
|
||||
}
|
||||
@ -41,21 +44,21 @@ The portion of the interface returned by GinkgoT() that maps onto methods in the
|
||||
type GinkgoTInterface interface {
|
||||
Cleanup(func())
|
||||
Setenv(kev, value string)
|
||||
Error(args ...interface{})
|
||||
Errorf(format string, args ...interface{})
|
||||
Error(args ...any)
|
||||
Errorf(format string, args ...any)
|
||||
Fail()
|
||||
FailNow()
|
||||
Failed() bool
|
||||
Fatal(args ...interface{})
|
||||
Fatalf(format string, args ...interface{})
|
||||
Fatal(args ...any)
|
||||
Fatalf(format string, args ...any)
|
||||
Helper()
|
||||
Log(args ...interface{})
|
||||
Logf(format string, args ...interface{})
|
||||
Log(args ...any)
|
||||
Logf(format string, args ...any)
|
||||
Name() string
|
||||
Parallel()
|
||||
Skip(args ...interface{})
|
||||
Skip(args ...any)
|
||||
SkipNow()
|
||||
Skipf(format string, args ...interface{})
|
||||
Skipf(format string, args ...any)
|
||||
Skipped() bool
|
||||
TempDir() string
|
||||
}
|
||||
@ -71,9 +74,9 @@ type FullGinkgoTInterface interface {
|
||||
AddReportEntryVisibilityNever(name string, args ...any)
|
||||
|
||||
//Prints to the GinkgoWriter
|
||||
Print(a ...interface{})
|
||||
Printf(format string, a ...interface{})
|
||||
Println(a ...interface{})
|
||||
Print(a ...any)
|
||||
Printf(format string, a ...any)
|
||||
Println(a ...any)
|
||||
|
||||
//Provides access to Ginkgo's color formatting, correctly configured to match the color settings specified in the invocation of ginkgo
|
||||
F(format string, args ...any) string
|
||||
@ -92,3 +95,81 @@ type FullGinkgoTInterface interface {
|
||||
|
||||
AttachProgressReporter(func() string) func()
|
||||
}
|
||||
|
||||
/*
|
||||
GinkgoTB() implements a wrapper that exactly matches the testing.TB interface.
|
||||
|
||||
In go 1.18 a new private() function was added to the testing.TB interface. Any function which accepts testing.TB as input needs to be passed in something that directly implements testing.TB.
|
||||
|
||||
This wrapper satisfies the testing.TB interface and intended to be used as a drop-in replacement with third party libraries that accept testing.TB.
|
||||
|
||||
Similar to GinkgoT(), GinkgoTB() takes an optional offset argument that can be used to get the
|
||||
correct line number associated with the failure - though you do not need to use this if you call GinkgoHelper() or GinkgoT().Helper() appropriately
|
||||
*/
|
||||
func GinkgoTB(optionalOffset ...int) *GinkgoTBWrapper {
|
||||
offset := 2
|
||||
if len(optionalOffset) > 0 {
|
||||
offset = optionalOffset[0]
|
||||
}
|
||||
return &GinkgoTBWrapper{GinkgoT: GinkgoT(offset)}
|
||||
}
|
||||
|
||||
type GinkgoTBWrapper struct {
|
||||
testing.TB
|
||||
GinkgoT FullGinkgoTInterface
|
||||
}
|
||||
|
||||
func (g *GinkgoTBWrapper) Cleanup(f func()) {
|
||||
g.GinkgoT.Cleanup(f)
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Error(args ...any) {
|
||||
g.GinkgoT.Error(args...)
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Errorf(format string, args ...any) {
|
||||
g.GinkgoT.Errorf(format, args...)
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Fail() {
|
||||
g.GinkgoT.Fail()
|
||||
}
|
||||
func (g *GinkgoTBWrapper) FailNow() {
|
||||
g.GinkgoT.FailNow()
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Failed() bool {
|
||||
return g.GinkgoT.Failed()
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Fatal(args ...any) {
|
||||
g.GinkgoT.Fatal(args...)
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Fatalf(format string, args ...any) {
|
||||
g.GinkgoT.Fatalf(format, args...)
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Helper() {
|
||||
types.MarkAsHelper(1)
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Log(args ...any) {
|
||||
g.GinkgoT.Log(args...)
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Logf(format string, args ...any) {
|
||||
g.GinkgoT.Logf(format, args...)
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Name() string {
|
||||
return g.GinkgoT.Name()
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Setenv(key, value string) {
|
||||
g.GinkgoT.Setenv(key, value)
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Skip(args ...any) {
|
||||
g.GinkgoT.Skip(args...)
|
||||
}
|
||||
func (g *GinkgoTBWrapper) SkipNow() {
|
||||
g.GinkgoT.SkipNow()
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Skipf(format string, args ...any) {
|
||||
g.GinkgoT.Skipf(format, args...)
|
||||
}
|
||||
func (g *GinkgoTBWrapper) Skipped() bool {
|
||||
return g.GinkgoT.Skipped()
|
||||
}
|
||||
func (g *GinkgoTBWrapper) TempDir() string {
|
||||
return g.GinkgoT.TempDir()
|
||||
}
|
||||
|
7
vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go
generated
vendored
Normal file
7
vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
//go:build wasm
|
||||
|
||||
package internal
|
||||
|
||||
func NewOutputInterceptor() OutputInterceptor {
|
||||
return &NoopOutputInterceptor{}
|
||||
}
|
10
vendor/github.com/onsi/ginkgo/v2/internal/progress_report_wasm.go
generated
vendored
Normal file
10
vendor/github.com/onsi/ginkgo/v2/internal/progress_report_wasm.go
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
//go:build wasm
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
var PROGRESS_SIGNALS = []os.Signal{syscall.SIGUSR1}
|
2
vendor/github.com/onsi/ginkgo/v2/internal/suite.go
generated
vendored
2
vendor/github.com/onsi/ginkgo/v2/internal/suite.go
generated
vendored
@ -79,7 +79,7 @@ func NewSuite() *Suite {
|
||||
|
||||
func (suite *Suite) Clone() (*Suite, error) {
|
||||
if suite.phase != PhaseBuildTopLevel {
|
||||
return nil, fmt.Errorf("cnanot clone suite after tree has been built")
|
||||
return nil, fmt.Errorf("cannot clone suite after tree has been built")
|
||||
}
|
||||
return &Suite{
|
||||
tree: &TreeNode{},
|
||||
|
113
vendor/github.com/onsi/ginkgo/v2/table_dsl.go
generated
vendored
113
vendor/github.com/onsi/ginkgo/v2/table_dsl.go
generated
vendored
@ -46,7 +46,7 @@ And can explore some Table patterns here: https://onsi.github.io/ginkgo/#table-s
|
||||
*/
|
||||
func DescribeTable(description string, args ...interface{}) bool {
|
||||
GinkgoHelper()
|
||||
generateTable(description, args...)
|
||||
generateTable(description, false, args...)
|
||||
return true
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ You can focus a table with `FDescribeTable`. This is equivalent to `FDescribe`.
|
||||
func FDescribeTable(description string, args ...interface{}) bool {
|
||||
GinkgoHelper()
|
||||
args = append(args, internal.Focus)
|
||||
generateTable(description, args...)
|
||||
generateTable(description, false, args...)
|
||||
return true
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ You can mark a table as pending with `PDescribeTable`. This is equivalent to `P
|
||||
func PDescribeTable(description string, args ...interface{}) bool {
|
||||
GinkgoHelper()
|
||||
args = append(args, internal.Pending)
|
||||
generateTable(description, args...)
|
||||
generateTable(description, false, args...)
|
||||
return true
|
||||
}
|
||||
|
||||
@ -75,6 +75,71 @@ You can mark a table as pending with `XDescribeTable`. This is equivalent to `X
|
||||
*/
|
||||
var XDescribeTable = PDescribeTable
|
||||
|
||||
/*
|
||||
DescribeTableSubtree describes a table-driven spec that generates a set of tests for each entry.
|
||||
|
||||
For example:
|
||||
|
||||
DescribeTableSubtree("a subtree table",
|
||||
func(url string, code int, message string) {
|
||||
var resp *http.Response
|
||||
BeforeEach(func() {
|
||||
var err error
|
||||
resp, err = http.Get(url)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
DeferCleanup(resp.Body.Close)
|
||||
})
|
||||
|
||||
It("should return the expected status code", func() {
|
||||
Expect(resp.StatusCode).To(Equal(code))
|
||||
})
|
||||
|
||||
It("should return the expected message", func() {
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(string(body)).To(Equal(message))
|
||||
})
|
||||
},
|
||||
Entry("default response", "example.com/response", http.StatusOK, "hello world"),
|
||||
Entry("missing response", "example.com/missing", http.StatusNotFound, "wat?"),
|
||||
)
|
||||
|
||||
Note that you **must** place define an It inside the body function.
|
||||
|
||||
You can learn more about DescribeTableSubtree here: https://onsi.github.io/ginkgo/#table-specs
|
||||
And can explore some Table patterns here: https://onsi.github.io/ginkgo/#table-specs-patterns
|
||||
*/
|
||||
func DescribeTableSubtree(description string, args ...interface{}) bool {
|
||||
GinkgoHelper()
|
||||
generateTable(description, true, args...)
|
||||
return true
|
||||
}
|
||||
|
||||
/*
|
||||
You can focus a table with `FDescribeTableSubtree`. This is equivalent to `FDescribe`.
|
||||
*/
|
||||
func FDescribeTableSubtree(description string, args ...interface{}) bool {
|
||||
GinkgoHelper()
|
||||
args = append(args, internal.Focus)
|
||||
generateTable(description, true, args...)
|
||||
return true
|
||||
}
|
||||
|
||||
/*
|
||||
You can mark a table as pending with `PDescribeTableSubtree`. This is equivalent to `PDescribe`.
|
||||
*/
|
||||
func PDescribeTableSubtree(description string, args ...interface{}) bool {
|
||||
GinkgoHelper()
|
||||
args = append(args, internal.Pending)
|
||||
generateTable(description, true, args...)
|
||||
return true
|
||||
}
|
||||
|
||||
/*
|
||||
You can mark a table as pending with `XDescribeTableSubtree`. This is equivalent to `XDescribe`.
|
||||
*/
|
||||
var XDescribeTableSubtree = PDescribeTableSubtree
|
||||
|
||||
/*
|
||||
TableEntry represents an entry in a table test. You generally use the `Entry` constructor.
|
||||
*/
|
||||
@ -131,14 +196,14 @@ var XEntry = PEntry
|
||||
var contextType = reflect.TypeOf(new(context.Context)).Elem()
|
||||
var specContextType = reflect.TypeOf(new(SpecContext)).Elem()
|
||||
|
||||
func generateTable(description string, args ...interface{}) {
|
||||
func generateTable(description string, isSubtree bool, args ...interface{}) {
|
||||
GinkgoHelper()
|
||||
cl := types.NewCodeLocation(0)
|
||||
containerNodeArgs := []interface{}{cl}
|
||||
|
||||
entries := []TableEntry{}
|
||||
var itBody interface{}
|
||||
var itBodyType reflect.Type
|
||||
var internalBody interface{}
|
||||
var internalBodyType reflect.Type
|
||||
|
||||
var tableLevelEntryDescription interface{}
|
||||
tableLevelEntryDescription = func(args ...interface{}) string {
|
||||
@ -166,11 +231,11 @@ func generateTable(description string, args ...interface{}) {
|
||||
case t.Kind() == reflect.Func && t.NumOut() == 1 && t.Out(0) == reflect.TypeOf(""):
|
||||
tableLevelEntryDescription = arg
|
||||
case t.Kind() == reflect.Func:
|
||||
if itBody != nil {
|
||||
if internalBody != nil {
|
||||
exitIfErr(types.GinkgoErrors.MultipleEntryBodyFunctionsForTable(cl))
|
||||
}
|
||||
itBody = arg
|
||||
itBodyType = reflect.TypeOf(itBody)
|
||||
internalBody = arg
|
||||
internalBodyType = reflect.TypeOf(internalBody)
|
||||
default:
|
||||
containerNodeArgs = append(containerNodeArgs, arg)
|
||||
}
|
||||
@ -200,39 +265,47 @@ func generateTable(description string, args ...interface{}) {
|
||||
err = types.GinkgoErrors.InvalidEntryDescription(entry.codeLocation)
|
||||
}
|
||||
|
||||
itNodeArgs := []interface{}{entry.codeLocation}
|
||||
itNodeArgs = append(itNodeArgs, entry.decorations...)
|
||||
internalNodeArgs := []interface{}{entry.codeLocation}
|
||||
internalNodeArgs = append(internalNodeArgs, entry.decorations...)
|
||||
|
||||
hasContext := false
|
||||
if itBodyType.NumIn() > 0. {
|
||||
if itBodyType.In(0).Implements(specContextType) {
|
||||
if internalBodyType.NumIn() > 0. {
|
||||
if internalBodyType.In(0).Implements(specContextType) {
|
||||
hasContext = true
|
||||
} else if itBodyType.In(0).Implements(contextType) && (len(entry.parameters) == 0 || !reflect.TypeOf(entry.parameters[0]).Implements(contextType)) {
|
||||
} else if internalBodyType.In(0).Implements(contextType) && (len(entry.parameters) == 0 || !reflect.TypeOf(entry.parameters[0]).Implements(contextType)) {
|
||||
hasContext = true
|
||||
}
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
err = validateParameters(itBody, entry.parameters, "Table Body function", entry.codeLocation, hasContext)
|
||||
err = validateParameters(internalBody, entry.parameters, "Table Body function", entry.codeLocation, hasContext)
|
||||
}
|
||||
|
||||
if hasContext {
|
||||
itNodeArgs = append(itNodeArgs, func(c SpecContext) {
|
||||
internalNodeArgs = append(internalNodeArgs, func(c SpecContext) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
invokeFunction(itBody, append([]interface{}{c}, entry.parameters...))
|
||||
invokeFunction(internalBody, append([]interface{}{c}, entry.parameters...))
|
||||
})
|
||||
if isSubtree {
|
||||
exitIfErr(types.GinkgoErrors.ContextsCannotBeUsedInSubtreeTables(cl))
|
||||
}
|
||||
} else {
|
||||
itNodeArgs = append(itNodeArgs, func() {
|
||||
internalNodeArgs = append(internalNodeArgs, func() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
invokeFunction(itBody, entry.parameters)
|
||||
invokeFunction(internalBody, entry.parameters)
|
||||
})
|
||||
}
|
||||
|
||||
pushNode(internal.NewNode(deprecationTracker, types.NodeTypeIt, description, itNodeArgs...))
|
||||
internalNodeType := types.NodeTypeIt
|
||||
if isSubtree {
|
||||
internalNodeType = types.NodeTypeContainer
|
||||
}
|
||||
|
||||
pushNode(internal.NewNode(deprecationTracker, internalNodeType, description, internalNodeArgs...))
|
||||
}
|
||||
})
|
||||
|
||||
|
9
vendor/github.com/onsi/ginkgo/v2/types/errors.go
generated
vendored
9
vendor/github.com/onsi/ginkgo/v2/types/errors.go
generated
vendored
@ -505,6 +505,15 @@ func (g ginkgoErrors) IncorrectVariadicParameterTypeToTableFunction(expected, ac
|
||||
}
|
||||
}
|
||||
|
||||
func (g ginkgoErrors) ContextsCannotBeUsedInSubtreeTables(cl CodeLocation) error {
|
||||
return GinkgoError{
|
||||
Heading: "Contexts cannot be used in subtree tables",
|
||||
Message: "You''ve defined a subtree body function that accepts a context but did not provide one in the table entry. Ginkgo SpecContexts can only be passed in to subject and setup nodes - so if you are trying to implement a spec timeout you should request a context in the It function within your subtree body function, not in the subtree body function itself.",
|
||||
CodeLocation: cl,
|
||||
DocLink: "table-specs",
|
||||
}
|
||||
}
|
||||
|
||||
/* Parallel Synchronization errors */
|
||||
|
||||
func (g ginkgoErrors) AggregatedReportUnavailableDueToNodeDisappearing() error {
|
||||
|
2
vendor/github.com/onsi/ginkgo/v2/types/version.go
generated
vendored
2
vendor/github.com/onsi/ginkgo/v2/types/version.go
generated
vendored
@ -1,3 +1,3 @@
|
||||
package types
|
||||
|
||||
const VERSION = "2.13.2"
|
||||
const VERSION = "2.14.0"
|
||||
|
Reference in New Issue
Block a user