Skip to content

Commit

Permalink
remove pointer calls
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya authored and dependabot[bot] committed Dec 20, 2023
1 parent 4d0f9f5 commit 2bbe8db
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions pkg/migrate/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
k8sclient "k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/fake"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
)

type testWriter struct {
Expand Down Expand Up @@ -859,7 +859,7 @@ func TestGetPVCs(t *testing.T) {
},
Spec: corev1.PersistentVolumeClaimSpec{
VolumeName: "pv2",
StorageClassName: pointer.String("sc1"),
StorageClassName: ptr.To("sc1"),
},
},
},
Expand Down
38 changes: 19 additions & 19 deletions pkg/preflight/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
k8sclient "k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/fake"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
)

func Test_validateVolumeAccessModes(t *testing.T) {
Expand All @@ -39,7 +39,7 @@ func Test_validateVolumeAccessModes(t *testing.T) {
Namespace: "default",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
StorageClassName: ptr.To("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteMany"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand All @@ -54,7 +54,7 @@ func Test_validateVolumeAccessModes(t *testing.T) {
Namespace: "default",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
StorageClassName: ptr.To("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteMany"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand Down Expand Up @@ -329,7 +329,7 @@ func Test_checkVolumeAccessModes(t *testing.T) {
UID: "12345",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("srcSc"),
StorageClassName: ptr.To("srcSc"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteMany"},
},
Status: corev1.PersistentVolumeClaimStatus{Phase: corev1.ClaimPending},
Expand Down Expand Up @@ -375,7 +375,7 @@ func Test_checkVolumeAccessModes(t *testing.T) {
UID: "12345",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("dstSc"),
StorageClassName: ptr.To("dstSc"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteMany"},
},
Status: corev1.PersistentVolumeClaimStatus{Phase: corev1.ClaimPending},
Expand Down Expand Up @@ -464,7 +464,7 @@ func Test_buildTmpPVC(t *testing.T) {
Namespace: "default",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("dstSc"),
StorageClassName: ptr.To("dstSc"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
},
},
Expand All @@ -474,7 +474,7 @@ func Test_buildTmpPVC(t *testing.T) {
Namespace: "default",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("dstSc"),
StorageClassName: ptr.To("dstSc"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand All @@ -496,7 +496,7 @@ func Test_buildTmpPVC(t *testing.T) {
},
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("dstSc"),
StorageClassName: ptr.To("dstSc"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
},
},
Expand All @@ -506,7 +506,7 @@ func Test_buildTmpPVC(t *testing.T) {
Namespace: "default",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("dstSc"),
StorageClassName: ptr.To("dstSc"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteMany"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand Down Expand Up @@ -617,7 +617,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Namespace: "default",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
StorageClassName: ptr.To("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand Down Expand Up @@ -680,7 +680,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Namespace: "default",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
StorageClassName: ptr.To("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand All @@ -695,7 +695,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Namespace: "test",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
StorageClassName: ptr.To("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand All @@ -710,7 +710,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Namespace: "test",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("rook"),
StorageClassName: ptr.To("rook"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteMany"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand All @@ -732,7 +732,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Namespace: "default",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
StorageClassName: ptr.To("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand All @@ -747,7 +747,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Namespace: "test",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
StorageClassName: ptr.To("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand Down Expand Up @@ -793,7 +793,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Namespace: "default",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
StorageClassName: ptr.To("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand All @@ -808,7 +808,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Namespace: "test",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
StorageClassName: ptr.To("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand Down Expand Up @@ -862,7 +862,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Namespace: "default",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
StorageClassName: ptr.To("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand All @@ -877,7 +877,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Namespace: "test",
},
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("rook"),
StorageClassName: ptr.To("rook"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteMany"},
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
Expand Down

0 comments on commit 2bbe8db

Please sign in to comment.