From 7f38ebce7afb911e6c501e64ec5123b95d9be11e Mon Sep 17 00:00:00 2001 From: Cecile Robert-Michon Date: Wed, 19 May 2021 16:41:00 -0700 Subject: [PATCH] Update machinepool_helpers.go --- test/framework/machinepool_helpers.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/test/framework/machinepool_helpers.go b/test/framework/machinepool_helpers.go index 85aae2b96b42..14311cb93156 100644 --- a/test/framework/machinepool_helpers.go +++ b/test/framework/machinepool_helpers.go @@ -20,7 +20,6 @@ import ( "context" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/cluster-api/test/framework/internal/log" "sigs.k8s.io/cluster-api/util/patch" @@ -257,13 +256,3 @@ func getMachinePoolInstanceVersions(ctx context.Context, input GetMachinesPoolIn return versions } - -func getUnstructuredRef(ctx context.Context, getter Getter, ref *corev1.ObjectReference, namespace string) *unstructured.Unstructured { - obj := new(unstructured.Unstructured) - obj.SetAPIVersion(ref.APIVersion) - obj.SetKind(ref.Kind) - obj.SetName(ref.Name) - key := client.ObjectKey{Name: obj.GetName(), Namespace: namespace} - Expect(getter.Get(ctx, key, obj)).ToNot(HaveOccurred(), "failed to retrieve %s object %q/%q", obj.GetKind(), key.Namespace, key.Name) - return obj -}