feat(cloud): harden multi-tenant runtime resources

This commit is contained in:
Junyan Qin
2026-07-29 11:32:26 +08:00
parent 32abbb636f
commit ae85ac2b16
211 changed files with 14963 additions and 1968 deletions
@@ -74,6 +74,19 @@ class TestS3StorageProviderInit:
assert provider.s3_client is None
assert provider.bucket_name is None
@pytest.mark.asyncio
async def test_shutdown_closes_client_once(self):
s3storage = get_s3storage_module()
provider = s3storage.S3StorageProvider(Mock())
client = Mock()
provider.s3_client = client
await provider.shutdown()
await provider.shutdown()
client.close.assert_called_once_with()
assert provider.s3_client is None
class TestS3StorageProviderWithMoto:
"""Tests using moto to mock AWS S3."""