diff options
| author | Shelley-BaoYue <baoyue2@huawei.com> | 2023-09-11 10:26:07 +0800 |
|---|---|---|
| committer | Shelley-BaoYue <baoyue2@huawei.com> | 2023-09-11 10:26:07 +0800 |
| commit | d2ee1b664e64c592dae2a08f1b959466cca7d8ba (patch) | |
| tree | 187f5ffae6f8d27a569079ab12d56e5c590332ed /tests | |
| parent | compatibility modification (diff) | |
| download | kubeedge-d2ee1b664e64c592dae2a08f1b959466cca7d8ba.tar.gz | |
update ginkgo version v2
Signed-off-by: Shelley-BaoYue <baoyue2@huawei.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/e2e/apps/deployment.go | 2 | ||||
| -rw-r--r-- | tests/e2e/apps/framework.go | 2 | ||||
| -rw-r--r-- | tests/e2e/device/device.go | 2 | ||||
| -rw-r--r-- | tests/e2e/device/framework.go | 2 | ||||
| -rw-r--r-- | tests/e2e/e2e_test.go | 21 | ||||
| -rw-r--r-- | tests/e2e/rule/framework.go | 2 | ||||
| -rw-r--r-- | tests/e2e/rule/rule.go | 2 | ||||
| -rw-r--r-- | tests/e2e/testsuite/testsuite.go | 2 | ||||
| -rw-r--r-- | tests/e2e/utils/log.go | 2 | ||||
| -rw-r--r-- | tests/e2e_edgesite/edgesite_test.go | 2 | ||||
| -rw-r--r-- | tests/e2e_keadm/keadm_suite_test.go | 2 | ||||
| -rw-r--r-- | tests/e2e_keadm/keadm_test.go | 2 | ||||
| -rwxr-xr-x | tests/scripts/execute.sh | 4 |
13 files changed, 16 insertions, 31 deletions
diff --git a/tests/e2e/apps/deployment.go b/tests/e2e/apps/deployment.go index a9e167b08..834924852 100644 --- a/tests/e2e/apps/deployment.go +++ b/tests/e2e/apps/deployment.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "github.com/onsi/ginkgo" + "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" diff --git a/tests/e2e/apps/framework.go b/tests/e2e/apps/framework.go index 75c6431fb..dc2b1a16b 100644 --- a/tests/e2e/apps/framework.go +++ b/tests/e2e/apps/framework.go @@ -16,7 +16,7 @@ limitations under the License. package apps -import "github.com/onsi/ginkgo" +import "github.com/onsi/ginkgo/v2" // GroupDescribe annotates the test with the group label. func GroupDescribe(text string, body func()) bool { diff --git a/tests/e2e/device/device.go b/tests/e2e/device/device.go index fe1af9d9d..80d57cf7f 100644 --- a/tests/e2e/device/device.go +++ b/tests/e2e/device/device.go @@ -21,7 +21,7 @@ import ( "net/http" "time" - "github.com/onsi/ginkgo" + "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/tests/e2e/device/framework.go b/tests/e2e/device/framework.go index 83e7a7192..bb9e21ae4 100644 --- a/tests/e2e/device/framework.go +++ b/tests/e2e/device/framework.go @@ -16,7 +16,7 @@ limitations under the License. package device -import "github.com/onsi/ginkgo" +import "github.com/onsi/ginkgo/v2" // GroupDescribe annotates the test with the group label. func GroupDescribe(text string, body func()) bool { diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 9ec09d000..ba04ed31d 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -18,18 +18,14 @@ package e2e import ( "flag" - "fmt" "os" - "path" "testing" - "github.com/onsi/ginkgo" - "github.com/onsi/ginkgo/reporters" + "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" "github.com/spf13/pflag" "k8s.io/klog/v2" "k8s.io/kubernetes/test/e2e/framework" - e2ereporters "k8s.io/kubernetes/test/e2e/reporters" _ "github.com/kubeedge/kubeedge/tests/e2e/apps" _ "github.com/kubeedge/kubeedge/tests/e2e/device" @@ -65,23 +61,12 @@ func TestE2E(t *testing.T) { }) // Run tests through the Ginkgo runner with output to console + JUnit for Jenkins - var r []ginkgo.Reporter if framework.TestContext.ReportDir != "" { if err := os.MkdirAll(framework.TestContext.ReportDir, 0755); err != nil { klog.Errorf("Failed creating report directory: %v", err) - } else { - r = append(r, reporters.NewJUnitReporter(path.Join(framework.TestContext.ReportDir, fmt.Sprintf("junit_%v.xml", framework.TestContext.ReportPrefix)))) } } - // Stream the progress to stdout and optionally a URL accepting progress updates. - r = append(r, e2ereporters.NewProgressReporter(framework.TestContext.ProgressReportURL)) - - // The DetailsRepoerter will output details about every test (name, files, lines, etc) which helps - // when documenting our tests. - if len(framework.TestContext.SpecSummaryOutput) > 0 { - r = append(r, e2ereporters.NewDetailsReporterFile(framework.TestContext.SpecSummaryOutput)) - } - - ginkgo.RunSpecsWithDefaultAndCustomReporters(t, "kubeedge e2e suite", r) + suiteConfig, reporterConfig := framework.CreateGinkgoConfig() + ginkgo.RunSpecs(t, "KubeEdge e2e suite", suiteConfig, reporterConfig) } diff --git a/tests/e2e/rule/framework.go b/tests/e2e/rule/framework.go index 69077d69a..e7d2220f3 100644 --- a/tests/e2e/rule/framework.go +++ b/tests/e2e/rule/framework.go @@ -16,7 +16,7 @@ limitations under the License. package rule -import "github.com/onsi/ginkgo" +import "github.com/onsi/ginkgo/v2" // GroupDescribe annotates the test with the group label. func GroupDescribe(text string, body func()) bool { diff --git a/tests/e2e/rule/rule.go b/tests/e2e/rule/rule.go index 93e4b24f9..f4841d81e 100644 --- a/tests/e2e/rule/rule.go +++ b/tests/e2e/rule/rule.go @@ -5,7 +5,7 @@ import ( "net/http" "time" - "github.com/onsi/ginkgo" + "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" "k8s.io/kubernetes/test/e2e/framework" diff --git a/tests/e2e/testsuite/testsuite.go b/tests/e2e/testsuite/testsuite.go index 9f7c94adf..00b7a0075 100644 --- a/tests/e2e/testsuite/testsuite.go +++ b/tests/e2e/testsuite/testsuite.go @@ -20,7 +20,7 @@ import ( "fmt" "time" - "github.com/onsi/ginkgo" + "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/tests/e2e/utils/log.go b/tests/e2e/utils/log.go index f1cffdaf0..c48f41b96 100644 --- a/tests/e2e/utils/log.go +++ b/tests/e2e/utils/log.go @@ -20,7 +20,7 @@ import ( "fmt" "time" - "github.com/onsi/ginkgo" + "github.com/onsi/ginkgo/v2" ) // nowStamp get time in millisec diff --git a/tests/e2e_edgesite/edgesite_test.go b/tests/e2e_edgesite/edgesite_test.go index b5c529d68..a8d455372 100644 --- a/tests/e2e_edgesite/edgesite_test.go +++ b/tests/e2e_edgesite/edgesite_test.go @@ -20,7 +20,7 @@ import ( "fmt" "time" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" metav1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/tests/e2e_keadm/keadm_suite_test.go b/tests/e2e_keadm/keadm_suite_test.go index 15cefe834..e72e3c913 100644 --- a/tests/e2e_keadm/keadm_suite_test.go +++ b/tests/e2e_keadm/keadm_suite_test.go @@ -21,7 +21,7 @@ import ( "os" "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/spf13/pflag" "k8s.io/kubernetes/test/e2e/framework" diff --git a/tests/e2e_keadm/keadm_test.go b/tests/e2e_keadm/keadm_test.go index 030a5ca87..d743e01ee 100644 --- a/tests/e2e_keadm/keadm_test.go +++ b/tests/e2e_keadm/keadm_test.go @@ -17,7 +17,7 @@ limitations under the License. package keadm import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/tests/scripts/execute.sh b/tests/scripts/execute.sh index 811448272..eade794a6 100755 --- a/tests/scripts/execute.sh +++ b/tests/scripts/execute.sh @@ -23,11 +23,11 @@ curpath=$PWD echo $PWD GOPATH=${GOPATH:-$(go env GOPATH)} -KIND_IMAGE=${1:-"kindest/node:v1.24.0"} +KIND_IMAGE=${1:-"kindest/node:v1.26.0"} compilemodule=$2 which ginkgo &> /dev/null || ( - go install github.com/onsi/ginkgo/ginkgo@latest + go install github.com/onsi/ginkgo/v2/ginkgo@latest sudo cp $GOPATH/bin/ginkgo /usr/local/bin/ ) |
