Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuvaraj Kakaraparthi committed Jun 8, 2022
1 parent 522e82c commit 38702fe
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 331 deletions.
2 changes: 1 addition & 1 deletion internal/controllers/cluster/cluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
utilfeature "k8s.io/component-base/featuregate/testing"
"k8s.io/utils/pointer"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"

utilfeature "k8s.io/component-base/featuregate/testing"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"
runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/util/intstr"
utilfeature "k8s.io/component-base/featuregate/testing"
"k8s.io/utils/pointer"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"

utilfeature "k8s.io/component-base/featuregate/testing"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1"
"sigs.k8s.io/cluster-api/feature"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"time"

"k8s.io/apimachinery/pkg/runtime"

runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1"
)

Expand Down
13 changes: 7 additions & 6 deletions internal/runtime/client/test/fake_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/runtime"

runtimev1 "sigs.k8s.io/cluster-api/exp/runtime/api/v1alpha1"
runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1"
runtimecatalog "sigs.k8s.io/cluster-api/internal/runtime/catalog"
Expand Down Expand Up @@ -86,7 +87,7 @@ type fakeRuntimeClient struct {
callResponses map[string]runtimehooksv1.ResponseObject
}

// CallAllExtensions implements Client
// CallAllExtensions implements Client.
func (fc *fakeRuntimeClient) CallAllExtensions(ctx context.Context, hook runtimecatalog.Hook, request runtime.Object, response runtimehooksv1.ResponseObject) error {
gvh, err := fc.catalog.GroupVersionHook(hook)
if err != nil {
Expand All @@ -107,7 +108,7 @@ func (fc *fakeRuntimeClient) CallAllExtensions(ctx context.Context, hook runtime
return nil
}

// CallExtension implements Client
// CallExtension implements Client.
func (fc *fakeRuntimeClient) CallExtension(ctx context.Context, _ runtimecatalog.Hook, name string, request runtime.Object, response runtimehooksv1.ResponseObject) error {
expectedResponse, ok := fc.callResponses[name]
if !ok {
Expand All @@ -121,22 +122,22 @@ func (fc *fakeRuntimeClient) CallExtension(ctx context.Context, _ runtimecatalog
return nil
}

// Discover implements Client
// Discover implements Client.
func (fc *fakeRuntimeClient) Discover(context.Context, *runtimev1.ExtensionConfig) (*runtimev1.ExtensionConfig, error) {
panic("unimplemented")
}

// IsReady implements Client
// IsReady implements Client.
func (fc *fakeRuntimeClient) IsReady() bool {
return fc.isReady
}

// Register implements Client
// Register implements Client.
func (fc *fakeRuntimeClient) Register(extensionConfig *runtimev1.ExtensionConfig) error {
panic("unimplemented")
}

// Unregister implements Client
// Unregister implements Client.
func (fc *fakeRuntimeClient) Unregister(extensionConfig *runtimev1.ExtensionConfig) error {
panic("unimplemented")
}
Expand Down
167 changes: 0 additions & 167 deletions poc/extension/handler.go

This file was deleted.

Loading

0 comments on commit 38702fe

Please sign in to comment.