mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-05 18:38:15 +02:00
Remove unnecessary check. Fix test with pointers.
This commit is contained in:
@@ -143,15 +143,6 @@ func (r *EBSVolumeResizer) ResizeVolume(volumeID string, newSize int64) error {
|
||||
// ModifyVolume Modify EBS volume
|
||||
func (r *EBSVolumeResizer) ModifyVolume(volumeID string, newType *string, newSize *int64, iops *int64, throughput *int64) error {
|
||||
/* first check if the volume is already of a requested size */
|
||||
volumeOutput, err := r.connection.DescribeVolumes(&ec2.DescribeVolumesInput{VolumeIds: []*string{&volumeID}})
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not get information about the volume: %v", err)
|
||||
}
|
||||
vol := volumeOutput.Volumes[0]
|
||||
if *vol.VolumeId != volumeID {
|
||||
return fmt.Errorf("describe volume %q returned information about a non-matching volume %q", volumeID, *vol.VolumeId)
|
||||
}
|
||||
|
||||
input := ec2.ModifyVolumeInput{Size: newSize, VolumeId: &volumeID, VolumeType: newType, Iops: iops, Throughput: throughput}
|
||||
output, err := r.connection.ModifyVolume(&input)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user