fix(organizations): return account state (#3053)

This commit is contained in:
Franklin G. Mendoza authored and GitHub committed 2026-09-05 07:50:02 -04:00
1 parent ec034a503a
commit 587d0b5758
2 files changed
+6 -2

No files matched your search

@@ -666,6 +666,7 @@ public class OrganizationsJsonHandler {
node.put("Arn", account.getArn());
node.put("Email", account.getEmail());
node.put("Name", account.getName());
node.put("State", account.getStatus());
node.put("Status", account.getStatus());
node.put("JoinedMethod", account.getJoinedMethod());
putTimestamp(node, "JoinedTimestamp", account.getJoinedTimestamp());
@@ -330,6 +330,7 @@ class OrganizationsIntegrationTest {
.body("Account.Id", equalTo(memberAccountId))
.body("Account.Email", equalTo("dev@example.com"))
.body("Account.Name", equalTo("Dev"))
.body("Account.State", equalTo("ACTIVE"))
.body("Account.Status", equalTo("ACTIVE"))
.body("Account.JoinedMethod", equalTo("CREATED"))
.body("Account.Arn", startsWith("arn:aws:organizations::000000000000:account/" + organizationId));
@@ -339,7 +340,8 @@ class OrganizationsIntegrationTest {
.post("/")
.then()
.statusCode(200)
.body("Accounts.Id", hasItems("000000000000", memberAccountId));
.body("Accounts.Id", hasItems("000000000000", memberAccountId))
.body("Accounts.State", hasItems("ACTIVE", "ACTIVE"));
}
@Test
@@ -359,7 +361,8 @@ class OrganizationsIntegrationTest {
.then()
.statusCode(200)
.body("Accounts", hasSize(1))
.body("Accounts[0].Id", equalTo(memberAccountId));
.body("Accounts[0].Id", equalTo(memberAccountId))
.body("Accounts[0].State", equalTo("ACTIVE"));
}
@Test