|
10 | 10 | import XCTest
|
11 | 11 |
|
12 | 12 | class AWSS3StoragePluginMultipleBucketTests: AWSS3StoragePluginTestBase {
|
13 |
| - var customBucket: (any StorageBucket)! |
| 13 | + private var customBucket: ResolvedStorageBucket! |
14 | 14 |
|
15 | 15 | override func setUp() async throws {
|
16 | 16 | guard let outputs = try? AmplifyOutputs.amplifyOutputs.resolveConfiguration(),
|
@@ -352,7 +352,7 @@ class AWSS3StoragePluginMultipleBucketTests: AWSS3StoragePluginTestBase {
|
352 | 352 | /// Given: An object in storage in a custom bucket
|
353 | 353 | /// When: Call the getURL API using key
|
354 | 354 | /// Then: The operation completes successfully with the URL retrieved
|
355 |
| - func testGetRemoteURL_fromCustomBucket_usingKey_sholdSucceed() async throws { |
| 355 | + func testGetRemoteURL_fromCustomBucket_usingKey_shouldSucceed() async throws { |
356 | 356 | let key = UUID().uuidString
|
357 | 357 | try await uploadData(
|
358 | 358 | key: key,
|
@@ -382,7 +382,7 @@ class AWSS3StoragePluginMultipleBucketTests: AWSS3StoragePluginTestBase {
|
382 | 382 | /// Given: An object in storage in a custom bucket
|
383 | 383 | /// When: Call the getURL API using StoragePath
|
384 | 384 | /// Then: The operation completes successfully with the URL retrieved
|
385 |
| - func testGetRemoteURL_fromCustomBucket_usingStoragePath_sholdSucceed() async throws { |
| 385 | + func testGetRemoteURL_fromCustomBucket_usingStoragePath_shouldSucceed() async throws { |
386 | 386 | let id = UUID().uuidString
|
387 | 387 | let path: StringStoragePath = .fromString("public/\(id)")
|
388 | 388 | try await uploadData(
|
@@ -410,39 +410,6 @@ class AWSS3StoragePluginMultipleBucketTests: AWSS3StoragePluginTestBase {
|
410 | 410 | XCTAssertEqual(deleted, path.string)
|
411 | 411 | }
|
412 | 412 |
|
413 |
| - /// Given: An object in storage in a custom bucket |
414 |
| - /// When: Call the list API using key |
415 |
| - /// Then: The operation completes successfully with the key retrieved |
416 |
| - func testList_fromOtherBucket_usingKey_shouldSucceed() async throws { |
417 |
| - let key = UUID().uuidString |
418 |
| - try await uploadData( |
419 |
| - key: key, |
420 |
| - data: Data(key.utf8), |
421 |
| - options: .init(bucket: customBucket) |
422 |
| - ) |
423 |
| - |
424 |
| - let result = try await Amplify.Storage.list( |
425 |
| - options: .init( |
426 |
| - path: key, |
427 |
| - bucket: customBucket |
428 |
| - ) |
429 |
| - ) |
430 |
| - let items = try XCTUnwrap(result.items) |
431 |
| - |
432 |
| - XCTAssertEqual(items.count, 1) |
433 |
| - let item = try XCTUnwrap(items.first) |
434 |
| - XCTAssertEqual(item.key, key) |
435 |
| - XCTAssertNotNil(item.eTag) |
436 |
| - XCTAssertNotNil(item.lastModified) |
437 |
| - XCTAssertNotNil(item.size) |
438 |
| - |
439 |
| - let deleted = try await Amplify.Storage.remove( |
440 |
| - key: key, |
441 |
| - options: .init(bucket: customBucket) |
442 |
| - ) |
443 |
| - XCTAssertEqual(deleted, key) |
444 |
| - } |
445 |
| - |
446 | 413 | /// Given: An object in storage in a custom bucket
|
447 | 414 | /// When: Call the list API using StoragePath
|
448 | 415 | /// Then: The operation completes successfully with the key retrieved
|
|
0 commit comments