-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ec2): Support for new EBS types #12074
Changes from 3 commits
ffef11e
bf924f8
8614ac4
c2f20a9
baa39d6
e64ca4c
f21617b
d3ccef6
d2a10da
ab1edf3
9ecf7b1
0fd879d
4279fba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -338,6 +338,25 @@ nodeunitShim({ | |
test.done(); | ||
}, | ||
|
||
'volume: io2'(test: Test) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If there is nothing special about the volume type, there is no need to add a unit test for it. Given the large number of types, adding a test for each one will increase the overall tests execution time without providing additional value. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I'm going to remove this test and all the others! As I saw tests with specific volume types, I considered it important for the process. But it makes sense not to increase the execution time of the tests. |
||
// GIVEN | ||
const stack = new cdk.Stack(); | ||
|
||
// WHEN | ||
new Volume(stack, 'Volume', { | ||
availabilityZone: 'us-east-1a', | ||
size: cdk.Size.gibibytes(500), | ||
volumeType: EbsDeviceVolumeType.PROVISIONED_IOPS_SSD, | ||
}); | ||
|
||
// THEN | ||
cdkExpect(stack).to(haveResourceLike('AWS::EC2::Volume', { | ||
VolumeType: 'io2', | ||
}, ResourcePart.Properties)); | ||
|
||
test.done(); | ||
}, | ||
|
||
'volume: gp2'(test: Test) { | ||
// GIVEN | ||
const stack = new cdk.Stack(); | ||
|
@@ -357,6 +376,25 @@ nodeunitShim({ | |
test.done(); | ||
}, | ||
|
||
'volume: gp3'(test: Test) { | ||
// GIVEN | ||
const stack = new cdk.Stack(); | ||
|
||
// WHEN | ||
new Volume(stack, 'Volume', { | ||
availabilityZone: 'us-east-1a', | ||
size: cdk.Size.gibibytes(500), | ||
volumeType: EbsDeviceVolumeType.GENERAL_PURPOSE_SSD, | ||
}); | ||
|
||
// THEN | ||
cdkExpect(stack).to(haveResourceLike('AWS::EC2::Volume', { | ||
VolumeType: 'gp3', | ||
}, ResourcePart.Properties)); | ||
|
||
test.done(); | ||
}, | ||
|
||
'volume: st1'(test: Test) { | ||
// GIVEN | ||
const stack = new cdk.Stack(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning is confusing. From the code it seems like setting volumeType to
EbsDeviceVolumeType.IO2
without setting iops is not allowed, but the warning implies the other way around?Same comment as below, if this test is not adding any value we shouldn't add it.
If these were added to satisfy the linter rule, note that I have added an exempt label so it will not block the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! As the comment above, I'll remove this test too.