Skip to content

Commit 49ec259

Browse files
committed
test: Updating integration tests
1 parent 0ddfc70 commit 49ec259

File tree

1 file changed

+3
-36
lines changed

1 file changed

+3
-36
lines changed

AmplifyPlugins/Storage/Tests/StorageHostApp/AWSS3StoragePluginIntegrationTests/AWSS3StoragePluginMultipleBucketTests.swift

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import XCTest
1111

1212
class AWSS3StoragePluginMultipleBucketTests: AWSS3StoragePluginTestBase {
13-
var customBucket: (any StorageBucket)!
13+
private var customBucket: ResolvedStorageBucket!
1414

1515
override func setUp() async throws {
1616
guard let outputs = try? AmplifyOutputs.amplifyOutputs.resolveConfiguration(),
@@ -352,7 +352,7 @@ class AWSS3StoragePluginMultipleBucketTests: AWSS3StoragePluginTestBase {
352352
/// Given: An object in storage in a custom bucket
353353
/// When: Call the getURL API using key
354354
/// 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 {
356356
let key = UUID().uuidString
357357
try await uploadData(
358358
key: key,
@@ -382,7 +382,7 @@ class AWSS3StoragePluginMultipleBucketTests: AWSS3StoragePluginTestBase {
382382
/// Given: An object in storage in a custom bucket
383383
/// When: Call the getURL API using StoragePath
384384
/// 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 {
386386
let id = UUID().uuidString
387387
let path: StringStoragePath = .fromString("public/\(id)")
388388
try await uploadData(
@@ -410,39 +410,6 @@ class AWSS3StoragePluginMultipleBucketTests: AWSS3StoragePluginTestBase {
410410
XCTAssertEqual(deleted, path.string)
411411
}
412412

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-
446413
/// Given: An object in storage in a custom bucket
447414
/// When: Call the list API using StoragePath
448415
/// Then: The operation completes successfully with the key retrieved

0 commit comments

Comments
 (0)