mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 23:59:27 -05:00
Follow-up to #5886, slice 11 of #4542. The review of #5886 noted that four classes on IndependentServiceSettingsProfile leave state behind: the AgentCore runtime, the Cognito user pool, the Kinesis stream and the Route 53 zones. CloudFrontCustomOriginServingTest does too, with its twenty distributions and the policies, public key and key group some of them use. That is harmless only while no other class on the profile calls those services. Each of the five now registers a delete with PartitionCleanup right after each create, so the delete runs after the test even when the test fails. The CloudFront class creates through small helpers that register the delete. A distribution goes through removeDistribution, which drops the same state as DeleteDistribution without the disable step, and the cleanup's reverse order deletes each distribution before the policies and keys it uses. The profile's javadoc now makes deleting what a class creates part of the rule for joining.