mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(ec2): include network metadata in instance type responses (#2943)
This commit is contained in:
1 parent
30b8f88467
commit
c54b237cd8
6 files changed
+61
-1
No files matched your search
@@ -2,6 +2,7 @@ package io.github.hectorvent.floci.services.ec2;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.List;
|
||||
@@ -54,6 +55,15 @@ class Ec2InstanceTypeCatalogTest {
|
||||
assertFalse(instanceTypeCatalog.find("m8gd.xlarge").isPresent());
|
||||
}
|
||||
|
||||
@Test
|
||||
void catalogEntriesIncludeNetworkCompatibilityMetadata() {
|
||||
instanceTypeCatalog.instanceTypes().forEach(instanceType ->
|
||||
assertNotNull(instanceType.encryptionInTransitSupported, instanceType.instanceType));
|
||||
|
||||
assertFalse(instanceTypeCatalog.find("m5.large").orElseThrow().encryptionInTransitSupported);
|
||||
assertFalse(instanceTypeCatalog.find("t4g.medium").orElseThrow().encryptionInTransitSupported);
|
||||
}
|
||||
|
||||
private void assertLargeGravitonType(String name) {
|
||||
Ec2InstanceTypeCatalog.CatalogInstanceType instanceType = instanceTypeCatalog.find(name).orElseThrow();
|
||||
|
||||
|
||||
@@ -792,6 +792,8 @@ class Ec2IntegrationTest {
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.instanceType", equalTo("m6gd.2xlarge"))
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.instanceStorageSupported", equalTo("true"))
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.instanceStorageInfo.totalSizeInGB", equalTo("474"))
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.networkInfo.encryptionInTransitSupported",
|
||||
equalTo("false"))
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.processorInfo.supportedArchitectures.item",
|
||||
equalTo("arm64"));
|
||||
}
|
||||
@@ -821,6 +823,8 @@ class Ec2IntegrationTest {
|
||||
everyItem(equalTo("true")))
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.instanceStorageInfo.totalSizeInGB",
|
||||
everyItem(equalTo("118")))
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.networkInfo.encryptionInTransitSupported",
|
||||
everyItem(equalTo("false")))
|
||||
.body("DescribeInstanceTypesResponse.instanceTypeSet.item.processorInfo.supportedArchitectures.item",
|
||||
everyItem(equalTo("arm64")));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user