@@ -11,7 +11,7 @@ import (
11
11
"google.golang.org/protobuf/types/known/durationpb"
12
12
"google.golang.org/protobuf/types/known/structpb"
13
13
"k8s.io/apimachinery/pkg/runtime"
14
- "k8s.io/utils/pointer "
14
+ "k8s.io/utils/ptr "
15
15
16
16
"github.com/crossplane/crossplane-runtime/pkg/logging"
17
17
@@ -159,8 +159,8 @@ func TestRunFunction(t *testing.T) {
159
159
Patches : []v1beta1.Patch {
160
160
{
161
161
Type : v1beta1 .PatchTypeFromCompositeFieldPath ,
162
- FromFieldPath : pointer . String ("spec.widgets" ),
163
- ToFieldPath : pointer . String ("spec.watchers" ),
162
+ FromFieldPath : ptr. To [ string ] ("spec.widgets" ),
163
+ ToFieldPath : ptr. To [ string ] ("spec.watchers" ),
164
164
Transforms : []v1beta1.Transform {
165
165
{
166
166
Type : v1beta1 .TransformTypeConvert ,
@@ -172,7 +172,7 @@ func TestRunFunction(t *testing.T) {
172
172
Type : v1beta1 .TransformTypeMath ,
173
173
Math : & v1beta1.MathTransform {
174
174
Type : v1beta1 .MathTransformTypeMultiply ,
175
- Multiply : pointer . Int64 (3 ),
175
+ Multiply : ptr. To [ int64 ] (3 ),
176
176
},
177
177
},
178
178
},
@@ -224,8 +224,8 @@ func TestRunFunction(t *testing.T) {
224
224
Patches : []v1beta1.Patch {
225
225
{
226
226
Type : v1beta1 .PatchTypeFromCompositeFieldPath ,
227
- FromFieldPath : pointer . String ("spec.widgets" ),
228
- ToFieldPath : pointer . String ("spec.watchers" ),
227
+ FromFieldPath : ptr. To [ string ] ("spec.widgets" ),
228
+ ToFieldPath : ptr. To [ string ] ("spec.watchers" ),
229
229
Transforms : []v1beta1.Transform {
230
230
{
231
231
Type : v1beta1 .TransformTypeConvert ,
@@ -237,7 +237,7 @@ func TestRunFunction(t *testing.T) {
237
237
Type : v1beta1 .TransformTypeMath ,
238
238
Math : & v1beta1.MathTransform {
239
239
Type : v1beta1 .MathTransformTypeMultiply ,
240
- Multiply : pointer . Int64 (3 ),
240
+ Multiply : ptr. To [ int64 ] (3 ),
241
241
},
242
242
},
243
243
},
@@ -294,8 +294,8 @@ func TestRunFunction(t *testing.T) {
294
294
Patches : []v1beta1.Patch {
295
295
{
296
296
Type : v1beta1 .PatchTypeFromCompositeFieldPath ,
297
- FromFieldPath : pointer . String ("spec.widgets" ),
298
- ToFieldPath : pointer . String ("spec.watchers" ),
297
+ FromFieldPath : ptr. To [ string ] ("spec.widgets" ),
298
+ ToFieldPath : ptr. To [ string ] ("spec.watchers" ),
299
299
},
300
300
},
301
301
},
@@ -391,16 +391,16 @@ func TestRunFunction(t *testing.T) {
391
391
{
392
392
// This patch should work.
393
393
Type : v1beta1 .PatchTypeFromCompositeFieldPath ,
394
- FromFieldPath : pointer . String ("spec.widgets" ),
395
- ToFieldPath : pointer . String ("spec.watchers" ),
394
+ FromFieldPath : ptr. To [ string ] ("spec.widgets" ),
395
+ ToFieldPath : ptr. To [ string ] ("spec.watchers" ),
396
396
},
397
397
{
398
398
// This patch should return an error,
399
399
// because the required path does not
400
400
// exist.
401
401
Type : v1beta1 .PatchTypeFromCompositeFieldPath ,
402
- FromFieldPath : pointer . String ("spec.doesNotExist" ),
403
- ToFieldPath : pointer . String ("spec.explode" ),
402
+ FromFieldPath : ptr. To [ string ] ("spec.doesNotExist" ),
403
+ ToFieldPath : ptr. To [ string ] ("spec.explode" ),
404
404
Policy : & v1beta1.PatchPolicy {
405
405
FromFieldPath : func () * v1beta1.FromFieldPathPolicy {
406
406
r := v1beta1 .FromFieldPathPolicyRequired
@@ -513,7 +513,7 @@ func TestRunFunction(t *testing.T) {
513
513
{
514
514
Type : v1beta1 .ConnectionDetailTypeFromConnectionSecretKey ,
515
515
Name : "very" ,
516
- FromConnectionSecretKey : pointer . String ("very" ),
516
+ FromConnectionSecretKey : ptr. To [ string ] ("very" ),
517
517
},
518
518
},
519
519
},
@@ -575,8 +575,8 @@ func TestRunFunction(t *testing.T) {
575
575
Patches : []v1beta1.Patch {
576
576
{
577
577
Type : v1beta1 .PatchTypeToCompositeFieldPath ,
578
- FromFieldPath : pointer . String ("spec.widgets" ),
579
- ToFieldPath : pointer . String ("spec.watchers" ),
578
+ FromFieldPath : ptr. To [ string ] ("spec.widgets" ),
579
+ ToFieldPath : ptr. To [ string ] ("spec.watchers" ),
580
580
Transforms : []v1beta1.Transform {
581
581
{
582
582
Type : v1beta1 .TransformTypeConvert ,
@@ -588,7 +588,7 @@ func TestRunFunction(t *testing.T) {
588
588
Type : v1beta1 .TransformTypeMath ,
589
589
Math : & v1beta1.MathTransform {
590
590
Type : v1beta1 .MathTransformTypeMultiply ,
591
- Multiply : pointer . Int64 (3 ),
591
+ Multiply : ptr. To [ int64 ] (3 ),
592
592
},
593
593
},
594
594
},
0 commit comments