|
|
|
|
@ -54,7 +54,7 @@ func TestBlockDevice(t *testing.T) {
|
|
|
|
|
VolumeType: "io1",
|
|
|
|
|
VolumeSize: 8,
|
|
|
|
|
DeleteOnTermination: true,
|
|
|
|
|
IOPS: 1000,
|
|
|
|
|
IOPS: aws.Int64(1000),
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
Result: &ec2.BlockDeviceMapping{
|
|
|
|
|
@ -73,7 +73,7 @@ func TestBlockDevice(t *testing.T) {
|
|
|
|
|
VolumeType: "io2",
|
|
|
|
|
VolumeSize: 8,
|
|
|
|
|
DeleteOnTermination: true,
|
|
|
|
|
IOPS: 1000,
|
|
|
|
|
IOPS: aws.Int64(1000),
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
Result: &ec2.BlockDeviceMapping{
|
|
|
|
|
@ -168,8 +168,8 @@ func TestBlockDevice(t *testing.T) {
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "gp3",
|
|
|
|
|
VolumeSize: 8,
|
|
|
|
|
Throughput: 125,
|
|
|
|
|
IOPS: 3000,
|
|
|
|
|
Throughput: aws.Int64(125),
|
|
|
|
|
IOPS: aws.Int64(3000),
|
|
|
|
|
DeleteOnTermination: true,
|
|
|
|
|
Encrypted: config.TriTrue,
|
|
|
|
|
},
|
|
|
|
|
@ -219,7 +219,7 @@ func TestIOPSValidation(t *testing.T) {
|
|
|
|
|
device: BlockDevice{
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "io1",
|
|
|
|
|
IOPS: 1000,
|
|
|
|
|
IOPS: aws.Int64(1000),
|
|
|
|
|
},
|
|
|
|
|
ok: true,
|
|
|
|
|
},
|
|
|
|
|
@ -227,7 +227,7 @@ func TestIOPSValidation(t *testing.T) {
|
|
|
|
|
device: BlockDevice{
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "io2",
|
|
|
|
|
IOPS: 1000,
|
|
|
|
|
IOPS: aws.Int64(1000),
|
|
|
|
|
},
|
|
|
|
|
ok: true,
|
|
|
|
|
},
|
|
|
|
|
@ -237,7 +237,7 @@ func TestIOPSValidation(t *testing.T) {
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "io1",
|
|
|
|
|
VolumeSize: 50,
|
|
|
|
|
IOPS: 1000,
|
|
|
|
|
IOPS: aws.Int64(1000),
|
|
|
|
|
},
|
|
|
|
|
ok: true,
|
|
|
|
|
},
|
|
|
|
|
@ -246,7 +246,7 @@ func TestIOPSValidation(t *testing.T) {
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "io2",
|
|
|
|
|
VolumeSize: 100,
|
|
|
|
|
IOPS: 1000,
|
|
|
|
|
IOPS: aws.Int64(1000),
|
|
|
|
|
},
|
|
|
|
|
ok: true,
|
|
|
|
|
},
|
|
|
|
|
@ -256,7 +256,7 @@ func TestIOPSValidation(t *testing.T) {
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "io1",
|
|
|
|
|
VolumeSize: 10,
|
|
|
|
|
IOPS: 2000,
|
|
|
|
|
IOPS: aws.Int64(2000),
|
|
|
|
|
},
|
|
|
|
|
ok: false,
|
|
|
|
|
msg: "/dev/sdb: the maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1 for io1 volumes",
|
|
|
|
|
@ -266,7 +266,7 @@ func TestIOPSValidation(t *testing.T) {
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "io2",
|
|
|
|
|
VolumeSize: 50,
|
|
|
|
|
IOPS: 30000,
|
|
|
|
|
IOPS: aws.Int64(30000),
|
|
|
|
|
},
|
|
|
|
|
ok: false,
|
|
|
|
|
msg: "/dev/sdb: the maximum ratio of provisioned IOPS to requested volume size (in GiB) is 500:1 for io2 volumes",
|
|
|
|
|
@ -277,7 +277,7 @@ func TestIOPSValidation(t *testing.T) {
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "io2",
|
|
|
|
|
VolumeSize: 500,
|
|
|
|
|
IOPS: 99999,
|
|
|
|
|
IOPS: aws.Int64(99999),
|
|
|
|
|
},
|
|
|
|
|
ok: false,
|
|
|
|
|
msg: "IOPS must be between 100 and 64000 for device /dev/sdb",
|
|
|
|
|
@ -288,7 +288,7 @@ func TestIOPSValidation(t *testing.T) {
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "io2",
|
|
|
|
|
VolumeSize: 50,
|
|
|
|
|
IOPS: 10,
|
|
|
|
|
IOPS: aws.Int64(10),
|
|
|
|
|
},
|
|
|
|
|
ok: false,
|
|
|
|
|
msg: "IOPS must be between 100 and 64000 for device /dev/sdb",
|
|
|
|
|
@ -299,8 +299,8 @@ func TestIOPSValidation(t *testing.T) {
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "gp3",
|
|
|
|
|
VolumeSize: 50,
|
|
|
|
|
Throughput: 125,
|
|
|
|
|
IOPS: 99999,
|
|
|
|
|
Throughput: aws.Int64(125),
|
|
|
|
|
IOPS: aws.Int64(99999),
|
|
|
|
|
},
|
|
|
|
|
ok: false,
|
|
|
|
|
msg: "IOPS must be between 3000 and 16000 for device /dev/sdb",
|
|
|
|
|
@ -311,8 +311,8 @@ func TestIOPSValidation(t *testing.T) {
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "gp3",
|
|
|
|
|
VolumeSize: 50,
|
|
|
|
|
Throughput: 125,
|
|
|
|
|
IOPS: 10,
|
|
|
|
|
Throughput: aws.Int64(125),
|
|
|
|
|
IOPS: aws.Int64(10),
|
|
|
|
|
},
|
|
|
|
|
ok: false,
|
|
|
|
|
msg: "IOPS must be between 3000 and 16000 for device /dev/sdb",
|
|
|
|
|
@ -346,8 +346,8 @@ func TestThroughputValidation(t *testing.T) {
|
|
|
|
|
device: BlockDevice{
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "gp3",
|
|
|
|
|
Throughput: 125,
|
|
|
|
|
IOPS: 3000,
|
|
|
|
|
Throughput: aws.Int64(125),
|
|
|
|
|
IOPS: aws.Int64(3000),
|
|
|
|
|
},
|
|
|
|
|
ok: true,
|
|
|
|
|
},
|
|
|
|
|
@ -355,8 +355,8 @@ func TestThroughputValidation(t *testing.T) {
|
|
|
|
|
device: BlockDevice{
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "gp3",
|
|
|
|
|
Throughput: 1000,
|
|
|
|
|
IOPS: 3000,
|
|
|
|
|
Throughput: aws.Int64(1000),
|
|
|
|
|
IOPS: aws.Int64(3000),
|
|
|
|
|
},
|
|
|
|
|
ok: true,
|
|
|
|
|
},
|
|
|
|
|
@ -365,8 +365,8 @@ func TestThroughputValidation(t *testing.T) {
|
|
|
|
|
device: BlockDevice{
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "gp3",
|
|
|
|
|
Throughput: 1001,
|
|
|
|
|
IOPS: 3000,
|
|
|
|
|
Throughput: aws.Int64(1001),
|
|
|
|
|
IOPS: aws.Int64(3000),
|
|
|
|
|
},
|
|
|
|
|
ok: false,
|
|
|
|
|
msg: "Throughput must be between 125 and 1000 for device /dev/sdb",
|
|
|
|
|
@ -376,8 +376,8 @@ func TestThroughputValidation(t *testing.T) {
|
|
|
|
|
device: BlockDevice{
|
|
|
|
|
DeviceName: "/dev/sdb",
|
|
|
|
|
VolumeType: "gp3",
|
|
|
|
|
Throughput: 124,
|
|
|
|
|
IOPS: 3000,
|
|
|
|
|
Throughput: aws.Int64(124),
|
|
|
|
|
IOPS: aws.Int64(3000),
|
|
|
|
|
},
|
|
|
|
|
ok: false,
|
|
|
|
|
msg: "Throughput must be between 125 and 1000 for device /dev/sdb",
|
|
|
|
|
|