mirror of
https://github.com/containers/podman.git
synced 2025-12-15 19:49:29 +08:00
Bump github.com/onsi/ginkgo from 1.12.2 to 1.12.3
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.12.2 to 1.12.3. - [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.12.2...v1.12.3) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
committed by
Daniel J Walsh
parent
92f5029838
commit
288bb2e858
37
vendor/github.com/onsi/ginkgo/extensions/table/table.go
generated
vendored
37
vendor/github.com/onsi/ginkgo/extensions/table/table.go
generated
vendored
@@ -12,7 +12,9 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/onsi/ginkgo"
|
||||
"github.com/onsi/ginkgo/internal/codelocation"
|
||||
"github.com/onsi/ginkgo/internal/global"
|
||||
"github.com/onsi/ginkgo/types"
|
||||
)
|
||||
|
||||
/*
|
||||
@@ -42,7 +44,7 @@ It's important to understand that the `Describe`s and `It`s are generated at eva
|
||||
Individual Entries can be focused (with FEntry) or marked pending (with PEntry or XEntry). In addition, the entire table can be focused or marked pending with FDescribeTable and PDescribeTable/XDescribeTable.
|
||||
*/
|
||||
func DescribeTable(description string, itBody interface{}, entries ...TableEntry) bool {
|
||||
describeTable(description, itBody, entries, false, false)
|
||||
describeTable(description, itBody, entries, types.FlagTypeNone)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -50,7 +52,7 @@ func DescribeTable(description string, itBody interface{}, entries ...TableEntry
|
||||
You can focus a table with `FDescribeTable`. This is equivalent to `FDescribe`.
|
||||
*/
|
||||
func FDescribeTable(description string, itBody interface{}, entries ...TableEntry) bool {
|
||||
describeTable(description, itBody, entries, false, true)
|
||||
describeTable(description, itBody, entries, types.FlagTypeFocused)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -58,7 +60,7 @@ func FDescribeTable(description string, itBody interface{}, entries ...TableEntr
|
||||
You can mark a table as pending with `PDescribeTable`. This is equivalent to `PDescribe`.
|
||||
*/
|
||||
func PDescribeTable(description string, itBody interface{}, entries ...TableEntry) bool {
|
||||
describeTable(description, itBody, entries, true, false)
|
||||
describeTable(description, itBody, entries, types.FlagTypePending)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -66,33 +68,24 @@ func PDescribeTable(description string, itBody interface{}, entries ...TableEntr
|
||||
You can mark a table as pending with `XDescribeTable`. This is equivalent to `XDescribe`.
|
||||
*/
|
||||
func XDescribeTable(description string, itBody interface{}, entries ...TableEntry) bool {
|
||||
describeTable(description, itBody, entries, true, false)
|
||||
describeTable(description, itBody, entries, types.FlagTypePending)
|
||||
return true
|
||||
}
|
||||
|
||||
func describeTable(description string, itBody interface{}, entries []TableEntry, pending bool, focused bool) {
|
||||
func describeTable(description string, itBody interface{}, entries []TableEntry, flag types.FlagType) {
|
||||
itBodyValue := reflect.ValueOf(itBody)
|
||||
if itBodyValue.Kind() != reflect.Func {
|
||||
panic(fmt.Sprintf("DescribeTable expects a function, got %#v", itBody))
|
||||
}
|
||||
|
||||
if pending {
|
||||
ginkgo.PDescribe(description, func() {
|
||||
global.Suite.PushContainerNode(
|
||||
description,
|
||||
func() {
|
||||
for _, entry := range entries {
|
||||
entry.generateIt(itBodyValue)
|
||||
}
|
||||
})
|
||||
} else if focused {
|
||||
ginkgo.FDescribe(description, func() {
|
||||
for _, entry := range entries {
|
||||
entry.generateIt(itBodyValue)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ginkgo.Describe(description, func() {
|
||||
for _, entry := range entries {
|
||||
entry.generateIt(itBodyValue)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
flag,
|
||||
codelocation.New(2),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user