Skip to content

Commit

Permalink
Update machinepool_helpers.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon committed May 19, 2021
1 parent 341c07a commit 7f38ebc
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions test/framework/machinepool_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
}

0 comments on commit 7f38ebc

Please sign in to comment.