From 146ed57921dd5e3c158a79515d697ea8fd4caca8 Mon Sep 17 00:00:00 2001 From: Thomas Buchner Date: Fri, 16 Feb 2024 09:24:46 +0100 Subject: [PATCH] replace deprecated k8s.io/utils/pointer --- pkg/controller/operatingsystemconfig/actuator_test.go | 4 ++-- .../operatingsystemconfig/generator/script_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/controller/operatingsystemconfig/actuator_test.go b/pkg/controller/operatingsystemconfig/actuator_test.go index e54eb42b..1117efc9 100644 --- a/pkg/controller/operatingsystemconfig/actuator_test.go +++ b/pkg/controller/operatingsystemconfig/actuator_test.go @@ -24,7 +24,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -55,7 +55,7 @@ var _ = Describe("Actuator", func() { Type: susechost.OSTypeSuSECHost, }, Purpose: extensionsv1alpha1.OperatingSystemConfigPurposeProvision, - Units: []extensionsv1alpha1.Unit{{Name: "some-unit", Content: pointer.String("foo")}}, + Units: []extensionsv1alpha1.Unit{{Name: "some-unit", Content: ptr.To("foo")}}, Files: []extensionsv1alpha1.File{{Path: "/some/file", Content: extensionsv1alpha1.FileContent{Inline: &extensionsv1alpha1.FileContentInline{Data: "bar"}}}}, }, } diff --git a/pkg/controller/operatingsystemconfig/generator/script_test.go b/pkg/controller/operatingsystemconfig/generator/script_test.go index a895d9c2..1f55d19b 100644 --- a/pkg/controller/operatingsystemconfig/generator/script_test.go +++ b/pkg/controller/operatingsystemconfig/generator/script_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "github.com/gardener/gardener-extension-os-suse-chost/pkg/apis/memoryonechost" "github.com/gardener/gardener-extension-os-suse-chost/pkg/controller/operatingsystemconfig/generator" @@ -47,8 +47,8 @@ var _ = Describe("Script Generator Test", func() { Type: memoryone.OSTypeMemoryOneCHost, ProviderConfig: &runtime.RawExtension{ Raw: encode(&memoryonechost.OperatingSystemConfiguration{ - MemoryTopology: pointer.String("3"), - SystemMemory: pointer.String("7x"), + MemoryTopology: ptr.To("3"), + SystemMemory: ptr.To("7x"), }), }, },