feat: add SQS + EventBridge
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import {expect, test} from 'vitest'
|
||||
import {bucketDeleteWarning} from '@/lib/bucketDeletion'
|
||||
|
||||
test('warns before deleting a bucket that contains folder prefixes', () => {
|
||||
expect(bucketDeleteWarning({
|
||||
prefix: '',
|
||||
objects: [{key: 'orders/', name: 'orders', type: 'folder', size: null, lastModified: null, metadata: {}}],
|
||||
})).toBe('This bucket contains objects or folders. Delete them before deleting the bucket.')
|
||||
})
|
||||
|
||||
test('allows deleting an empty bucket', () => {
|
||||
expect(bucketDeleteWarning({prefix: '', objects: []})).toBeNull()
|
||||
})
|
||||
Reference in New Issue
Block a user