Skip to content

Commit

Permalink
update preflight
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 f59de74 commit 4d0f9f5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion pkg/preflight/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func buildTmpPVC(pvc corev1.PersistentVolumeClaim, sc string) (*corev1.Persisten
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: &sc,
AccessModes: destAccessModes,
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand Down
28 changes: 14 additions & 14 deletions pkg/preflight/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func Test_validateVolumeAccessModes(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteMany"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand All @@ -56,7 +56,7 @@ func Test_validateVolumeAccessModes(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteMany"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand Down Expand Up @@ -476,7 +476,7 @@ func Test_buildTmpPVC(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("dstSc"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand Down Expand Up @@ -508,7 +508,7 @@ func Test_buildTmpPVC(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("dstSc"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteMany"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand Down Expand Up @@ -619,7 +619,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand Down Expand Up @@ -682,7 +682,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand All @@ -697,7 +697,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand All @@ -712,7 +712,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("rook"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteMany"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand All @@ -734,7 +734,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand All @@ -749,7 +749,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand Down Expand Up @@ -795,7 +795,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand All @@ -810,7 +810,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand Down Expand Up @@ -864,7 +864,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("default"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand All @@ -879,7 +879,7 @@ func Test_pvcsForStorageClass(t *testing.T) {
Spec: corev1.PersistentVolumeClaimSpec{
StorageClassName: pointer.String("rook"),
AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteMany"},
Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: resource.MustParse("1Mi"),
},
Expand Down

0 comments on commit 4d0f9f5

Please sign in to comment.