Merge pull request #132878 from ylink-lfs/chore/int32ptr_removal

chore: replace int32Ptr usage with ptr.To
This commit is contained in:
Kubernetes Prow Robot
2025-07-12 18:18:21 -07:00
committed by GitHub
4 changed files with 12 additions and 18 deletions

View File

@@ -1597,7 +1597,7 @@ func TestGetSubresourcesAsTables(t *testing.T) {
Name: "replicationcontroller-1",
},
Spec: v1.ReplicationControllerSpec{
Replicas: int32Ptr(2),
Replicas: ptr.To[int32](2),
Selector: map[string]string{
"label": "test-label",
},
@@ -1632,7 +1632,7 @@ func TestGetSubresourcesAsTables(t *testing.T) {
Name: "replicationcontroller-2",
},
Spec: v1.ReplicationControllerSpec{
Replicas: int32Ptr(2),
Replicas: ptr.To[int32](2),
Selector: map[string]string{
"label": "test-label",
},
@@ -3678,10 +3678,6 @@ func assertManagedFields(t *testing.T, obj *unstructured.Unstructured) {
}
}
func int32Ptr(i int32) *int32 {
return &i
}
// TestDefaultStorageEncoding verifies that the storage encoding for all built-in resources is
// Protobuf.
func TestDefaultStorageEncoding(t *testing.T) {