diff options
| author | Shelley-BaoYue <baoyue2@huawei.com> | 2023-10-26 14:28:25 +0800 |
|---|---|---|
| committer | Shelley-BaoYue <baoyue2@huawei.com> | 2023-10-27 16:06:28 +0800 |
| commit | d8188ac82760149f55eb8930e6be1ab99ad46fa3 (patch) | |
| tree | 06d77ae2dacaffda5d987930aed630f06e34a9a8 /tests | |
| parent | Merge pull request #5114 from Shelley-BaoYue/master (diff) | |
| download | kubeedge-d8188ac82760149f55eb8930e6be1ab99ad46fa3.tar.gz | |
modify parameters for ginkgo v2
Signed-off-by: Shelley-BaoYue <baoyue2@huawei.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/e2e/apps/deployment.go | 14 | ||||
| -rw-r--r-- | tests/e2e/device/device.go | 10 | ||||
| -rw-r--r-- | tests/e2e/rule/rule.go | 6 | ||||
| -rw-r--r-- | tests/e2e/utils/log.go | 6 | ||||
| -rw-r--r-- | tests/e2e_edgesite/edgesite_test.go | 10 | ||||
| -rw-r--r-- | tests/e2e_keadm/keadm_test.go | 6 |
6 files changed, 26 insertions, 26 deletions
diff --git a/tests/e2e/apps/deployment.go b/tests/e2e/apps/deployment.go index 834924852..ee92d713c 100644 --- a/tests/e2e/apps/deployment.go +++ b/tests/e2e/apps/deployment.go @@ -42,7 +42,7 @@ var DeploymentTestTimerGroup = utils.NewTestTimerGroup() var _ = GroupDescribe("Application deployment test in E2E scenario", func() { var UID string var testTimer *utils.TestTimer - var testSpecReport ginkgo.GinkgoTestDescription + var testSpecReport ginkgo.SpecReport var clientSet clientset.Interface @@ -53,9 +53,9 @@ var _ = GroupDescribe("Application deployment test in E2E scenario", func() { ginkgo.Context("Test application deployment and delete deployment using deployment spec", func() { ginkgo.BeforeEach(func() { // Get current test SpecReport - testSpecReport = ginkgo.CurrentGinkgoTestDescription() + testSpecReport = ginkgo.CurrentSpecReport() // Start test timer - testTimer = DeploymentTestTimerGroup.NewTestTimer(testSpecReport.TestText) + testTimer = DeploymentTestTimerGroup.NewTestTimer(testSpecReport.LeafNodeText) }) ginkgo.AfterEach(func() { @@ -122,9 +122,9 @@ var _ = GroupDescribe("Application deployment test in E2E scenario", func() { ginkgo.Context("Test application deployment using Pod spec", func() { ginkgo.BeforeEach(func() { // Get current test SpecReport - testSpecReport = ginkgo.CurrentGinkgoTestDescription() + testSpecReport = ginkgo.CurrentSpecReport() // Start test timer - testTimer = DeploymentTestTimerGroup.NewTestTimer(testSpecReport.TestText) + testTimer = DeploymentTestTimerGroup.NewTestTimer(testSpecReport.LeafNodeText) }) ginkgo.AfterEach(func() { // End test timer @@ -229,9 +229,9 @@ var _ = GroupDescribe("Application deployment test in E2E scenario", func() { ginkgo.Context("StatefulSet lifecycle test in edge node", func() { ginkgo.BeforeEach(func() { // Get current test SpecReport - testSpecReport = ginkgo.CurrentGinkgoTestDescription() + testSpecReport = ginkgo.CurrentSpecReport() // Start test timer - testTimer = DeploymentTestTimerGroup.NewTestTimer(testSpecReport.TestText) + testTimer = DeploymentTestTimerGroup.NewTestTimer(testSpecReport.LeafNodeText) }) ginkgo.AfterEach(func() { diff --git a/tests/e2e/device/device.go b/tests/e2e/device/device.go index 955921ecd..784bcbdce 100644 --- a/tests/e2e/device/device.go +++ b/tests/e2e/device/device.go @@ -36,7 +36,7 @@ const ( // Run Test cases var _ = GroupDescribe("Device Management test in E2E scenario", func() { var testTimer *utils.TestTimer - var testSpecReport ginkgo.GinkgoTestDescription + var testSpecReport ginkgo.SpecReport var edgeClientSet edgeclientset.Interface ginkgo.BeforeEach(func() { @@ -53,9 +53,9 @@ var _ = GroupDescribe("Device Management test in E2E scenario", func() { gomega.Expect(err).To(gomega.BeNil()) } // Get current test SpecReport - testSpecReport = ginkgo.CurrentGinkgoTestDescription() + testSpecReport = ginkgo.CurrentSpecReport() // Start test timer - testTimer = utils.CRDTestTimerGroup.NewTestTimer(testSpecReport.TestText) + testTimer = utils.CRDTestTimerGroup.NewTestTimer(testSpecReport.LeafNodeText) }) ginkgo.AfterEach(func() { // End test timer @@ -121,9 +121,9 @@ var _ = GroupDescribe("Device Management test in E2E scenario", func() { } utils.TwinResult = utils.DeviceTwinResult{} // Get current test SpecReport - testSpecReport = ginkgo.CurrentGinkgoTestDescription() + testSpecReport = ginkgo.CurrentSpecReport() // Start test timer - testTimer = utils.CRDTestTimerGroup.NewTestTimer(testSpecReport.TestText) + testTimer = utils.CRDTestTimerGroup.NewTestTimer(testSpecReport.LeafNodeText) }) ginkgo.AfterEach(func() { // End test timer diff --git a/tests/e2e/rule/rule.go b/tests/e2e/rule/rule.go index f4841d81e..423a8a8c6 100644 --- a/tests/e2e/rule/rule.go +++ b/tests/e2e/rule/rule.go @@ -16,7 +16,7 @@ import ( var _ = GroupDescribe("Rule Management test in E2E scenario", func() { var testTimer *utils.TestTimer - var testSpecReport ginkgo.GinkgoTestDescription + var testSpecReport ginkgo.SpecReport var edgeClientSet edgeclientset.Interface ginkgo.BeforeEach(func() { @@ -41,9 +41,9 @@ var _ = GroupDescribe("Rule Management test in E2E scenario", func() { gomega.Expect(err).To(gomega.BeNil()) } // Get current test SpecReport - testSpecReport = ginkgo.CurrentGinkgoTestDescription() + testSpecReport = ginkgo.CurrentSpecReport() // Start test timer - testTimer = utils.CRDTestTimerGroup.NewTestTimer(testSpecReport.TestText) + testTimer = utils.CRDTestTimerGroup.NewTestTimer(testSpecReport.LeafNodeText) }) ginkgo.AfterEach(func() { // End test timer diff --git a/tests/e2e/utils/log.go b/tests/e2e/utils/log.go index c48f41b96..497ea0dab 100644 --- a/tests/e2e/utils/log.go +++ b/tests/e2e/utils/log.go @@ -55,11 +55,11 @@ func Infof(format string, args ...interface{}) { // PrintTestcaseNameandStatus print the test case name and status of execution func PrintTestcaseNameandStatus() { var Status string - testSpecReport := ginkgo.CurrentGinkgoTestDescription() - if testSpecReport.Failed { + testSpecReport := ginkgo.CurrentSpecReport() + if testSpecReport.Failed() { Status = "FAILED" } else { Status = "PASSED" } - Infof("TestCase:%40s Status=%s", testSpecReport.TestText, Status) + Infof("TestCase:%40s Status=%s", testSpecReport.LeafNodeText, Status) } diff --git a/tests/e2e_edgesite/edgesite_test.go b/tests/e2e_edgesite/edgesite_test.go index a8d455372..ef996b1b5 100644 --- a/tests/e2e_edgesite/edgesite_test.go +++ b/tests/e2e_edgesite/edgesite_test.go @@ -39,7 +39,7 @@ var DeploymentTestTimerGroup = utils.NewTestTimerGroup() var _ = Describe("Application deployment test in E2E scenario using EdgeSite", func() { var UID string var testTimer *utils.TestTimer - var testSpecReport GinkgoTestDescription + var testSpecReport SpecReport var clientSet clientset.Interface @@ -50,9 +50,9 @@ var _ = Describe("Application deployment test in E2E scenario using EdgeSite", f Context("Test application deployment and delete deployment using deployment spec", func() { BeforeEach(func() { // Get current test SpecReport - testSpecReport = CurrentGinkgoTestDescription() + testSpecReport = CurrentSpecReport() // Start test timer - testTimer = DeploymentTestTimerGroup.NewTestTimer(testSpecReport.TestText) + testTimer = DeploymentTestTimerGroup.NewTestTimer(testSpecReport.LeafNodeText) }) AfterEach(func() { @@ -118,9 +118,9 @@ var _ = Describe("Application deployment test in E2E scenario using EdgeSite", f Context("Test application deployment using Pod spec using EdgeSite", func() { BeforeEach(func() { // Get current test SpecReport - testSpecReport = CurrentGinkgoTestDescription() + testSpecReport = CurrentSpecReport() // Start test timer - testTimer = DeploymentTestTimerGroup.NewTestTimer(testSpecReport.TestText) + testTimer = DeploymentTestTimerGroup.NewTestTimer(testSpecReport.LeafNodeText) }) AfterEach(func() { diff --git a/tests/e2e_keadm/keadm_test.go b/tests/e2e_keadm/keadm_test.go index d743e01ee..317da8728 100644 --- a/tests/e2e_keadm/keadm_test.go +++ b/tests/e2e_keadm/keadm_test.go @@ -34,7 +34,7 @@ var DeploymentTestTimerGroup = utils.NewTestTimerGroup() // Run Test cases var _ = Describe("Application deployment test in keadm E2E scenario", func() { var testTimer *utils.TestTimer - var testSpecReport GinkgoTestDescription + var testSpecReport SpecReport var clientSet clientset.Interface @@ -45,9 +45,9 @@ var _ = Describe("Application deployment test in keadm E2E scenario", func() { Context("Test application deployment using Pod spec", func() { BeforeEach(func() { // Get current test SpecReport - testSpecReport = CurrentGinkgoTestDescription() + testSpecReport = CurrentSpecReport() // Start test timer - testTimer = DeploymentTestTimerGroup.NewTestTimer(testSpecReport.TestText) + testTimer = DeploymentTestTimerGroup.NewTestTimer(testSpecReport.LeafNodeText) }) AfterEach(func() { // End test timer |
