test: fix event type
@@ -17,23 +17,23 @@ import (
"context"
"log"
- eniConfig "github.com/aws/amazon-vpc-cni-k8s/pkg/apis/crd/v1alpha1"
- "github.com/aws/amazon-vpc-cni-k8s/test/framework/controller"
- "github.com/aws/amazon-vpc-cni-k8s/test/framework/helm"
- "github.com/aws/amazon-vpc-cni-k8s/test/framework/resources/aws"
- "github.com/aws/amazon-vpc-cni-k8s/test/framework/resources/k8s"
- "github.com/aws/amazon-vpc-cni-k8s/test/framework/utils"
sgp "github.com/aws/amazon-vpc-resource-controller-k8s/apis/vpcresources/v1beta1"
"github.com/go-logr/logr"
. "github.com/onsi/gomega"
v1 "k8s.io/api/core/v1"
- eventsv1 "k8s.io/api/events/v1"
"k8s.io/apimachinery/pkg/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/tools/clientcmd"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
+
+ eniConfig "github.com/aws/amazon-vpc-cni-k8s/pkg/apis/crd/v1alpha1"
+ "github.com/aws/amazon-vpc-cni-k8s/test/framework/controller"
+ "github.com/aws/amazon-vpc-cni-k8s/test/framework/helm"
+ "github.com/aws/amazon-vpc-cni-k8s/test/framework/resources/aws"
+ "github.com/aws/amazon-vpc-cni-k8s/test/framework/resources/k8s"
+ "github.com/aws/amazon-vpc-cni-k8s/test/framework/utils"
)
type Framework struct {
@@ -62,7 +62,7 @@ func New(options Options) *Framework {
cache, err := cache.New(config, cache.Options{Scheme: k8sSchema})
Expect(err).NotTo(HaveOccurred())
- err = cache.IndexField(context.TODO(), &eventsv1.Event{}, "reason", func(o client.Object) []string {
+ err = cache.IndexField(context.TODO(), &v1.Event{}, "reason", func(o client.Object) []string {
return []string{o.(*v1.Event).Reason}
}) // default indexing only on ns, need this for ipamd_event_test
Expect(err).NotTo(HaveOccurred())
