diff options
| author | Congrool <chpzhangyifei@zju.edu.cn> | 2022-06-30 18:38:44 +0800 |
|---|---|---|
| committer | Congrool <chpzhangyifei@zju.edu.cn> | 2022-07-12 19:12:43 +0800 |
| commit | 35f946cdb2b6d00bb600a75ed9fdaec2d4c2c008 (patch) | |
| tree | ad8d01de8bbae9803c61952b1d99ad337beea6e2 /tests/e2e/utils | |
| parent | Merge pull request #4043 from fisherxu/rn-1.9.4 (diff) | |
| download | kubeedge-35f946cdb2b6d00bb600a75ed9fdaec2d4c2c008.tar.gz | |
bump ginkgo to v2
Signed-off-by: Congrool <chpzhangyifei@zju.edu.cn>
Diffstat (limited to 'tests/e2e/utils')
| -rw-r--r-- | tests/e2e/utils/common.go | 2 | ||||
| -rw-r--r-- | tests/e2e/utils/log.go | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/tests/e2e/utils/common.go b/tests/e2e/utils/common.go index db06bdcc6..83ff22e20 100644 --- a/tests/e2e/utils/common.go +++ b/tests/e2e/utils/common.go @@ -30,7 +30,7 @@ import ( "time" MQTT "github.com/eclipse/paho.mqtt.golang" - "github.com/onsi/ginkgo" + "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" apps "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" diff --git a/tests/e2e/utils/log.go b/tests/e2e/utils/log.go index d79508c2b..7268fd2d9 100644 --- a/tests/e2e/utils/log.go +++ b/tests/e2e/utils/log.go @@ -19,7 +19,7 @@ import ( "fmt" "time" - "github.com/onsi/ginkgo" + "github.com/onsi/ginkgo/v2" ) //Function to get time in millisec @@ -53,13 +53,12 @@ func Infof(format string, args ...interface{}) { //Function to print the test case name and status of execution func PrintTestcaseNameandStatus() { - var testdesc ginkgo.GinkgoTestDescription var Status string - testdesc = ginkgo.CurrentGinkgoTestDescription() - if testdesc.Failed { + testSpecReport := ginkgo.CurrentSpecReport() + if testSpecReport.Failed() { Status = "FAILED" } else { Status = "PASSED" } - Infof("TestCase:%40s Status=%s", testdesc.TestText, Status) + Infof("TestCase:%40s Status=%s", testSpecReport.LeafNodeText, Status) } |
