chore(iam): clean up the users a list test leaves and record whose reading the gap is (#7568)

Two follow-ups from the change that read every Query list off the indices a request numbers.

The tests holding that reading create a user each and deleted none of them. The emulator is shared
between test classes, so those users outlive the class that made them and the next class to list
users unscoped reads them. The provider the same class creates is registered with the cleanup
extension already, which the class holds for exactly this, so each user is registered beside it.

The reading itself is recorded as this service's own. Nothing published says AWS takes a gap in a
numbered list, and no SDK sends one: botocore's Query serializer numbers a list from 1 with no gap
in it, so a request carrying one is written by hand. What is recorded is that the constraints ahead
of each operation read every index a request names, which is the disagreement that change closed,
so a gap is read the way the constraint walk already read it until a capture says otherwise. The
account properties map says the same of its own entries.

Nothing under src/main changes.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-11-04 21:50:59 -06:00
1 parent a64fa37cd7
commit 0f6d23c917
2 files changed
+17 -3

No files matched your search

@@ -38,7 +38,10 @@ class IamQueryListIndicesIntegrationTest {
"{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\","
+ "\"Action\":\"s3:GetObject\",\"Resource\":\"*\"}]}";
/** The provider below outlives this class otherwise, and the next class to list providers reads it. */
/**
* What these tests create outlives this class otherwise: the next class to list users or
* providers unscoped reads what this one left.
*/
@RegisterExtension
final PartitionCleanup cleanup = new PartitionCleanup();
@@ -50,9 +53,11 @@ class IamQueryListIndicesIntegrationTest {
return prefix + "-" + System.nanoTime();
}
private static String createUser(String prefix) {
private String createUser(String prefix) {
String name = unique(prefix);
iam("CreateUser").formParam("UserName", name).when().post("/").then().statusCode(200);
cleanup.register(() -> iam("DeleteUser")
.formParam("UserName", name).when().post("/").then().statusCode(200));
return name;
}