From 190314535dd740bc8bcb197091dbc0085e268f86 Mon Sep 17 00:00:00 2001 From: Sebastian Villena <97059974+ruisebas@users.noreply.github.com> Date: Tue, 10 Sep 2024 18:46:17 -0400 Subject: [PATCH] feat: Updating to AWS SDK for Swift 0.76.0 Also fixing Storage unit test for aborted uploads --- .../Internal/StorageMultipartUploadSession.swift | 1 + .../StorageMultipartUploadSessionTests.swift | 3 ++- Package.resolved | 16 ++++++++-------- Package.swift | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageMultipartUploadSession.swift b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageMultipartUploadSession.swift index f4149037e5..f5dc25f76a 100644 --- a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageMultipartUploadSession.swift +++ b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageMultipartUploadSession.swift @@ -24,6 +24,7 @@ enum StorageMultipartUploadBehavior { case progressive } +// swiftlint:disable type_body_length class StorageMultipartUploadSession { enum Failure: Error { case invalidStateTransition diff --git a/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Support/Internal/StorageMultipartUploadSessionTests.swift b/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Support/Internal/StorageMultipartUploadSessionTests.swift index f51f974e34..43e051033e 100644 --- a/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Support/Internal/StorageMultipartUploadSessionTests.swift +++ b/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Support/Internal/StorageMultipartUploadSessionTests.swift @@ -133,9 +133,10 @@ class StorageMultipartUploadSessionTests: XCTestCase { print("Progress: \(String(format: "%.2f", progress.fractionCompleted))") case .failed(let error): print("Error: \(error)") - XCTFail("Must not fail") + completedExp.fulfill() case .completed: print("Completed") + XCTFail("Must not complete") completedExp.fulfill() } } diff --git a/Package.resolved b/Package.resolved index 9f9da6a8b8..5abb508b28 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/awslabs/aws-sdk-swift.git", "state" : { - "revision" : "4ce6d0594c4cb73c7ef2e3b582561e1659e79746", - "version" : "0.74.0" + "revision" : "9658373d352717a7c06fab528a4a9d84747143a7", + "version" : "0.76.0" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mattgallagher/CwlCatchException.git", "state" : { - "revision" : "3ef6999c73b6938cc0da422f2c912d0158abb0a0", - "version" : "2.2.0" + "revision" : "07b2ba21d361c223e25e3c1e924288742923f08c", + "version" : "2.2.1" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git", "state" : { - "revision" : "2ef56b2caf25f55fa7eef8784c30d5a767550f54", - "version" : "2.2.1" + "revision" : "0139c665ebb45e6a9fbdb68aabfd7c39f3fe0071", + "version" : "2.2.2" } }, { @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/smithy-lang/smithy-swift", "state" : { - "revision" : "6a3e98f400f4430757fb3ca5714659371f1a9525", - "version" : "0.64.0" + "revision" : "146b5b7ed87140d1ae86eccc070aa24ef8f23276", + "version" : "0.66.0" } }, { diff --git a/Package.swift b/Package.swift index fa11028922..ac5ecb6d7f 100644 --- a/Package.swift +++ b/Package.swift @@ -9,7 +9,7 @@ let platforms: [SupportedPlatform] = [ .watchOS(.v9) ] let dependencies: [Package.Dependency] = [ - .package(url: "https://github.com/awslabs/aws-sdk-swift.git", exact: "0.74.0"), + .package(url: "https://github.com/awslabs/aws-sdk-swift.git", exact: "0.76.0"), .package(url: "https://github.com/stephencelis/SQLite.swift.git", exact: "0.15.3"), .package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", from: "2.1.0"), .package(url: "https://github.com/aws-amplify/amplify-swift-utils-notifications.git", from: "1.1.0")