mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(ec2): return groupSet from DescribeInstanceAttribute (#1709)
* fix(ec2): return groupSet from DescribeInstanceAttribute Ansible's amazon.aws ec2_instance module reads value['Groups'] from DescribeInstanceAttribute(Attribute=groupSet) in diff_instance_and_params; Floci returned only instanceId for that attribute, producing the reported KeyError. DescribeInstances group shapes were already correct. Refs #1644 * test(ec2): give describeInstanceAttributeGroupSet a unique order slot
This commit is contained in:
1 parent
82b4574af0
commit
8b39ead1a4
3 files changed
+66
-1
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package io.github.hectorvent.floci.services.ec2;
|
||||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.emptyOrNullString;
|
||||
import static org.hamcrest.Matchers.containsInAnyOrder;
|
||||
import static org.hamcrest.Matchers.everyItem;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
@@ -1330,6 +1331,23 @@ class Ec2IntegrationTest {
|
||||
equalTo("running"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(87)
|
||||
void describeInstanceAttributeGroupSet() {
|
||||
given()
|
||||
.formParam("Action", "DescribeInstanceAttribute")
|
||||
.formParam("InstanceId", instanceId)
|
||||
.formParam("Attribute", "groupSet")
|
||||
.header("Authorization", AUTH_HEADER)
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body("DescribeInstanceAttributeResponse.instanceId", equalTo(instanceId))
|
||||
.body("DescribeInstanceAttributeResponse.groupSet.item.groupId", equalTo(securityGroupId))
|
||||
.body("DescribeInstanceAttributeResponse.groupSet.item.groupName", not(emptyOrNullString()));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(82)
|
||||
void describeInstancesHasNetworkInterfaceAttachTime() {
|
||||
@@ -1435,7 +1453,7 @@ class Ec2IntegrationTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(87)
|
||||
@Order(88)
|
||||
void describeInstancesByFilter() {
|
||||
given()
|
||||
.formParam("Action", "DescribeInstances")
|
||||
|
||||
Reference in new issue
Block a user