Skip to content

Commit

Permalink
upgrade ginkgo to v2.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nce3xin committed Nov 29, 2024
1 parent 185240b commit 0020e20
Show file tree
Hide file tree
Showing 37 changed files with 13 additions and 60 deletions.
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
Expand Down Expand Up @@ -231,7 +230,6 @@ require (
gopkg.in/gcfg.v1 v1.2.3 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.28.3 // indirect
Expand Down
5 changes: 1 addition & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,6 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+
github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
Expand All @@ -1019,8 +1018,6 @@ github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+
github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU=
github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk=
Expand All @@ -1034,6 +1031,7 @@ github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzm
github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts=
github.com/onsi/ginkgo/v2 v2.9.4/go.mod h1:gCQYp2Q+kSoIj7ykSVb9nskRSsR6PUj4AiLywzIhbKM=
github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU=
github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM=
github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
Expand Down Expand Up @@ -1857,7 +1855,6 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs
gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import (
// test/e2e/lifecycle/framework.go
package lifecycle
import "github.com/onsi/ginkgo/v2"
import "github.com/onsi/ginkgo/v2/v2"
// SIGDescribe annotates the test with the SIG label.
func SIGDescribe(text string, body func()) bool {
Expand All @@ -58,7 +58,7 @@ func SIGDescribe(text string, body func()) bool {
package bootstrap
import (
"github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/v2"
"github.com/koordinator-sh/koordinator/test/e2e/lifecycle"
)
var _ = lifecycle.SIGDescribe("[Feature:BootstrapTokens]", func() {
Expand Down
5 changes: 2 additions & 3 deletions test/e2e/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ import (
"testing"
"time"

"github.com/onsi/ginkgo/config"
"github.com/onsi/ginkgo/reporters"
"github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/config"
"github.com/onsi/ginkgo/v2/reporters"
"github.com/onsi/gomega"

v1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
// the ginkgo test runner will not detect that this
// directory contains a Ginkgo test suite.
// See https://github.com/kubernetes/kubernetes/issues/74827
// "github.com/onsi/ginkgo/v2"
// "github.com/onsi/ginkgo/v2/v2"

"k8s.io/component-base/version"

Expand Down
1 change: 0 additions & 1 deletion test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import (
"k8s.io/client-go/restmapper"
scaleclient "k8s.io/client-go/scale"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"

koordinatorclientset "github.com/koordinator-sh/koordinator/pkg/client/clientset/versioned"
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/framework/ginkgowrapper/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import (
"runtime"
"runtime/debug"
"strings"

"github.com/onsi/ginkgo/v2"
)

// FailurePanic is the value that will be panicked from Fail.
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/framework/kubectl/kubectl_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ import (

e2elog "github.com/koordinator-sh/koordinator/test/e2e/framework/log"
e2epod "github.com/koordinator-sh/koordinator/test/e2e/framework/pod"

"github.com/onsi/ginkgo/v2"
)

const (
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/framework/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import (
"runtime/debug"
"time"

"github.com/onsi/ginkgo/v2"

// TODO: Remove the following imports (ref: https://github.com/kubernetes/kubernetes/issues/81245)
e2eginkgowrapper "github.com/koordinator-sh/koordinator/test/e2e/framework/ginkgowrapper"
)
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/framework/log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import (
"fmt"
"time"

"github.com/onsi/ginkgo/v2"

e2eginkgowrapper "github.com/koordinator-sh/koordinator/test/e2e/framework/ginkgowrapper"
)

Expand Down
5 changes: 2 additions & 3 deletions test/e2e/framework/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ import (
"strings"
"testing"

"github.com/onsi/ginkgo/config"
"github.com/onsi/ginkgo/reporters"
"github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/config"
"github.com/onsi/ginkgo/v2/reporters"
"github.com/onsi/gomega"

"github.com/koordinator-sh/koordinator/test/e2e/framework"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/framework/node/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"strings"
"time"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"

v1 "k8s.io/api/core/v1"
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/framework/nodes_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import (
"sync"
"time"

"github.com/onsi/ginkgo/v2"

v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/wait"
clientset "k8s.io/client-go/kubernetes"
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/framework/pod/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import (
"fmt"
"time"

"github.com/onsi/ginkgo/v2"

v1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/framework/pod/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"strings"
"time"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/framework/pod/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import (
"text/tabwriter"
"time"

"github.com/onsi/ginkgo/v2"

v1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/framework/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
v1core "k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/kubectl/pkg/util/podutils"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"

// TODO: Remove the following imports (ref: https://github.com/kubernetes/kubernetes/issues/81245)
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/framework/psp.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ import (

imageutils "github.com/koordinator-sh/koordinator/test/utils/image"

"github.com/onsi/ginkgo/v2"

// TODO: Remove the following imports (ref: https://github.com/kubernetes/kubernetes/issues/81245)
e2eauth "github.com/koordinator-sh/koordinator/test/e2e/framework/auth"
)
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/framework/skipper/skipper.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import (
"runtime/debug"
"strings"

"github.com/onsi/ginkgo/v2"

apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework/test_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"strings"
"time"

"github.com/onsi/ginkgo/config"
"github.com/onsi/ginkgo/v2/config"
restclient "k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/framework/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import (
"syscall"
"time"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
gomegatypes "github.com/onsi/gomega/types"

Expand Down
2 changes: 0 additions & 2 deletions test/e2e/quota/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ limitations under the License.

package quota

import "github.com/onsi/ginkgo/v2"

// SIGDescribe describes SIG information
func SIGDescribe(text string, body func()) bool {
return ginkgo.Describe("[quota] "+text, body)
Expand Down
1 change: 0 additions & 1 deletion test/e2e/quota/multi_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"fmt"
"time"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/quota/quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"fmt"
"time"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/quota/quota_guaranteed.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"strings"
"time"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/reporters/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (

"k8s.io/klog/v2"

"github.com/onsi/ginkgo/config"
"github.com/onsi/ginkgo/types"
"github.com/onsi/ginkgo/v2/config"
"github.com/onsi/ginkgo/v2/types"
)

// ProgressReporter is a ginkgo reporter which tracks the total number of tests to be run/passed/failed/skipped.
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/reporters/testDetails.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"os"
"path/filepath"

"github.com/onsi/ginkgo/config"
"github.com/onsi/ginkgo/types"
"github.com/onsi/ginkgo/v2/config"
"github.com/onsi/ginkgo/v2/types"
"k8s.io/klog/v2"
)

Expand Down
1 change: 0 additions & 1 deletion test/e2e/scheduling/deviceshare.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"sort"
"time"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/scheduling/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ limitations under the License.

package scheduling

import "github.com/onsi/ginkgo/v2"

// SIGDescribe describes SIG information
func SIGDescribe(text string, body func()) bool {
return ginkgo.Describe("[scheduling] "+text, body)
Expand Down
1 change: 0 additions & 1 deletion test/e2e/scheduling/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (

nrtv1alpha1 "github.com/k8stopologyawareschedwg/noderesourcetopology-api/pkg/apis/topology/v1alpha1"
nrtclientset "github.com/k8stopologyawareschedwg/noderesourcetopology-api/pkg/generated/clientset/versioned"
"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/scheduling/hostport.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"context"
"time"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/scheduling/nodenumaresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"time"

nrtclientset "github.com/k8stopologyawareschedwg/noderesourcetopology-api/pkg/generated/clientset/versioned"
"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/scheduling/preemption.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"fmt"
"time"

"github.com/onsi/ginkgo/v2"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/scheduling/reservation.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"sort"
"time"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/slocontroller/batchresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"context"
"time"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/slocontroller/cpunormalization.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (

topov1alpha1 "github.com/k8stopologyawareschedwg/noderesourcetopology-api/pkg/apis/topology/v1alpha1"
nrtclientset "github.com/k8stopologyawareschedwg/noderesourcetopology-api/pkg/generated/clientset/versioned"
"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/slocontroller/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ limitations under the License.

package slocontroller

import "github.com/onsi/ginkgo/v2"

// SIGDescribe describes SIG information
func SIGDescribe(text string, body func()) bool {
return ginkgo.Describe("[slo-controller] "+text, body)
Expand Down

0 comments on commit 0020e20

Please sign in to comment.