aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2020-06-01 10:55:39 +0000
committerDaniel J Walsh <dwalsh@redhat.com>2020-06-02 07:22:54 -0400
commit288bb2e858521dc8b90c33c4b8bcd83ddba15997 (patch)
treecbb150575eb53efaef81c5038ff8f3bb31ab2553 /vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go
parent92f502983885566a0b7bca4ae6c1bc5a8414a482 (diff)
downloadpodman-288bb2e858521dc8b90c33c4b8bcd83ddba15997.tar.gz
podman-288bb2e858521dc8b90c33c4b8bcd83ddba15997.tar.bz2
podman-288bb2e858521dc8b90c33c4b8bcd83ddba15997.zip
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>
Diffstat (limited to 'vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go')
-rw-r--r--vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go33
1 files changed, 21 insertions, 12 deletions
diff --git a/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go b/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go
index 93f3bc3b0..1a919a1fe 100644
--- a/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go
+++ b/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go
@@ -3,22 +3,31 @@ package table
import (
"reflect"
- "github.com/onsi/ginkgo"
+ "github.com/onsi/ginkgo/internal/codelocation"
+ "github.com/onsi/ginkgo/internal/global"
+ "github.com/onsi/ginkgo/types"
)
/*
TableEntry represents an entry in a table test. You generally use the `Entry` constructor.
*/
type TableEntry struct {
- Description string
- Parameters []interface{}
- Pending bool
- Focused bool
+ Description string
+ Parameters []interface{}
+ Pending bool
+ Focused bool
+ codeLocation types.CodeLocation
}
func (t TableEntry) generateIt(itBody reflect.Value) {
+ if t.codeLocation == (types.CodeLocation{}) {
+ // The user created the TableEntry struct directly instead of having used the (F/P/X)Entry constructors.
+ // Therefore default to the code location of the surrounding DescribeTable.
+ t.codeLocation = codelocation.New(5)
+ }
+
if t.Pending {
- ginkgo.PIt(t.Description)
+ global.Suite.PushItNode(t.Description, func() {}, types.FlagTypePending, t.codeLocation, 0)
return
}
@@ -38,9 +47,9 @@ func (t TableEntry) generateIt(itBody reflect.Value) {
}
if t.Focused {
- ginkgo.FIt(t.Description, body)
+ global.Suite.PushItNode(t.Description, body, types.FlagTypeFocused, t.codeLocation, global.DefaultTimeout)
} else {
- ginkgo.It(t.Description, body)
+ global.Suite.PushItNode(t.Description, body, types.FlagTypeNone, t.codeLocation, global.DefaultTimeout)
}
}
@@ -53,26 +62,26 @@ Subsequent parameters are saved off and sent to the callback passed in to `Descr
Each Entry ends up generating an individual Ginkgo It.
*/
func Entry(description string, parameters ...interface{}) TableEntry {
- return TableEntry{description, parameters, false, false}
+ return TableEntry{description, parameters, false, false, codelocation.New(1)}
}
/*
You can focus a particular entry with FEntry. This is equivalent to FIt.
*/
func FEntry(description string, parameters ...interface{}) TableEntry {
- return TableEntry{description, parameters, false, true}
+ return TableEntry{description, parameters, false, true, codelocation.New(1)}
}
/*
You can mark a particular entry as pending with PEntry. This is equivalent to PIt.
*/
func PEntry(description string, parameters ...interface{}) TableEntry {
- return TableEntry{description, parameters, true, false}
+ return TableEntry{description, parameters, true, false, codelocation.New(1)}
}
/*
You can mark a particular entry as pending with XEntry. This is equivalent to XIt.
*/
func XEntry(description string, parameters ...interface{}) TableEntry {
- return TableEntry{description, parameters, true, false}
+ return TableEntry{description, parameters, true, false, codelocation.New(1)}
}