Skip to content

Commit a5ea96c

Browse files
committed
ic: aws: replace deprecate k8s package
k8s.io/utils/pointer has been replaced by k8s.io/utils/ptr (Go generics version)
1 parent 92ae10a commit a5ea96c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/asset/installconfig/aws/validation_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/stretchr/testify/assert"
1414
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1515
"k8s.io/apimachinery/pkg/util/validation/field"
16-
"k8s.io/utils/pointer"
16+
"k8s.io/utils/ptr"
1717

1818
"github.com/openshift/installer/pkg/asset/installconfig/aws/mock"
1919
"github.com/openshift/installer/pkg/ipnet"
@@ -68,7 +68,7 @@ func validInstallConfig() *types.InstallConfig {
6868
},
6969
ControlPlane: &types.MachinePool{
7070
Architecture: types.ArchitectureAMD64,
71-
Replicas: pointer.Int64Ptr(3),
71+
Replicas: ptr.To[int64](3),
7272
Platform: types.MachinePoolPlatform{
7373
AWS: &aws.MachinePool{
7474
Zones: []string{"a", "b", "c"},
@@ -78,7 +78,7 @@ func validInstallConfig() *types.InstallConfig {
7878
Compute: []types.MachinePool{{
7979
Name: types.MachinePoolComputeRoleName,
8080
Architecture: types.ArchitectureAMD64,
81-
Replicas: pointer.Int64Ptr(3),
81+
Replicas: ptr.To[int64](3),
8282
Platform: types.MachinePoolPlatform{
8383
AWS: &aws.MachinePool{
8484
Zones: []string{"a", "b", "c"},
@@ -725,7 +725,7 @@ func TestValidate(t *testing.T) {
725725
c := validInstallConfig()
726726
c.Platform.AWS.Region = "us-gov-east-1"
727727
c.ControlPlane.Platform.AWS.AMIID = "custom-ami"
728-
c.Compute[0].Replicas = pointer.Int64Ptr(0)
728+
c.Compute[0].Replicas = ptr.To[int64](0)
729729
return c
730730
}(),
731731
availZones: validAvailZones(),

0 commit comments

Comments
 (0)