diff --git a/pkg/config/types_test.go b/pkg/config/types_test.go index 54300524..9cb10c87 100644 --- a/pkg/config/types_test.go +++ b/pkg/config/types_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/k8snetworkplumbingwg/multus-dynamic-networks-controller/pkg/cri" diff --git a/pkg/controller/pod_test.go b/pkg/controller/pod_test.go index 895c7872..03ecedcc 100644 --- a/pkg/controller/pod_test.go +++ b/pkg/controller/pod_test.go @@ -8,7 +8,7 @@ import ( "path" "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" cni100 "github.com/containernetworking/cni/pkg/types/100" @@ -404,7 +404,19 @@ func newDummyPodController( podController.areNetAttachDefsSynched = alwaysReady podInformerFactory.Start(stopChannel) + synced := podInformerFactory.WaitForCacheSync(stopChannel) + for v, ok := range synced { + if !ok { + fmt.Fprintf(os.Stderr, "caches failed to sync (podInformerFactory): %v", v) + } + } netAttachDefInformerFactory.Start(stopChannel) + synced = netAttachDefInformerFactory.WaitForCacheSync(stopChannel) + for v, ok := range synced { + if !ok { + fmt.Fprintf(os.Stderr, "caches failed to sync (netAttachDefInformerFactory): %v", v) + } + } controller := &dummyPodController{ PodNetworksController: podController, diff --git a/pkg/cri/containerd/runtime_test.go b/pkg/cri/containerd/runtime_test.go index a52eb6f8..a19fc5df 100644 --- a/pkg/cri/containerd/runtime_test.go +++ b/pkg/cri/containerd/runtime_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/k8snetworkplumbingwg/multus-dynamic-networks-controller/pkg/cri/containerd/fake" diff --git a/pkg/cri/crio/runtime_test.go b/pkg/cri/crio/runtime_test.go index 3d0a8413..c4db1a60 100644 --- a/pkg/cri/crio/runtime_test.go +++ b/pkg/cri/crio/runtime_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/k8snetworkplumbingwg/multus-dynamic-networks-controller/pkg/cri/crio/fake"