Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions pkg/provisioners/channel_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ import (
"fmt"
"testing"

"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
"github.com/knative/pkg/apis"
istiov1alpha3 "github.com/knative/pkg/apis/istio/v1alpha3"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/scheme"
runtimeClient "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
)

const (
Expand Down Expand Up @@ -102,7 +101,7 @@ func getNewChannel() *eventingv1alpha1.Channel {
Spec: eventingv1alpha1.ChannelSpec{
Provisioner: &corev1.ObjectReference{
Name: clusterChannelProvisionerName,
Kind: "ClusterProvisioner",
Kind: "ClusterChannelProvisioner",
APIVersion: eventingv1alpha1.SchemeGroupVersion.String(),
},
},
Expand Down
9 changes: 4 additions & 5 deletions pkg/provisioners/provisioner_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if you could fix the import ordering in your editor :)

imports from same pkg are usually in a separate group

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bloody Visual Studio Code.

what are you using ?

and any template to import ?

"github.com/knative/eventing/pkg/system"
"github.com/knative/pkg/apis"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
runtimeClient "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
)

const (
Expand Down Expand Up @@ -62,13 +61,13 @@ func TestUpdateClusterChannelProvisioner(t *testing.T) {

ignore := cmpopts.IgnoreTypes(apis.VolatileTime{})
if diff := cmp.Diff(want, got, ignore); diff != "" {
t.Errorf("ClusterProvisioner (-want, +got) = %v", diff)
t.Errorf("ClusterChannelProvisioner (-want, +got) = %v", diff)
}
}

func getNewClusterChannelProvisioner() *eventingv1alpha1.ClusterChannelProvisioner {
clusterChannelProvisioner := &eventingv1alpha1.ClusterChannelProvisioner{
TypeMeta: ClusterProvisonerType(),
TypeMeta: ClusterChannelProvisionerType(),
ObjectMeta: om(testNS, clusterChannelProvisionerName),
Spec: eventingv1alpha1.ClusterChannelProvisionerSpec{},
}
Expand All @@ -77,7 +76,7 @@ func getNewClusterChannelProvisioner() *eventingv1alpha1.ClusterChannelProvision
return clusterChannelProvisioner
}

func ClusterProvisonerType() metav1.TypeMeta {
func ClusterChannelProvisionerType() metav1.TypeMeta {
return metav1.TypeMeta{
APIVersion: eventingv1alpha1.SchemeGroupVersion.String(),
Kind: "ClusterChannelProvisioner",
Expand Down