Skip to content

Commit f2684a7

Browse files
authored
Changes to build and pass tests (#6867)
* Update retry sample for restored maxAttempts * Prepping for GA stage 1 This patch fixes some failing tests and has been gone through to ensure that everything builds. More revisions to come. * Updated to call for Swift tools 5.9 in package * Restore accidentally erased test
1 parent 67c7298 commit f2684a7

File tree

55 files changed

+42
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+42
-81
lines changed

swift/example_code/cognito-identity/FindOrCreateIdentityPool/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.8
1+
// swift-tools-version:5.9
22
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
// SPDX-License-Identifier: Apache-2.0
44
//

swift/example_code/dynamodb/BatchGetItem/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.6
1+
// swift-tools-version:5.9
22
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
// SPDX-License-Identifier: Apache-2.0
44

swift/example_code/dynamodb/BatchGetItem/Sources/batchgetitem.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ struct ExampleCommand: ParsableCommand {
4949

5050
/// Called by ``main()`` to asynchronously run the AWS example.
5151
func runAsync() async throws {
52-
SDKLoggingSystem.initialize(logLevel: .error)
5352
print("Welcome to the AWS SDK for Swift batchGetItem() example for Amazon DynamoDB!")
5453
print("Please wait while the database is installed and searched...\n")
5554

swift/example_code/dynamodb/BatchGetItem/Tests/MovieTests.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@ final class MovieTests: XCTestCase {
1717

1818
/// Class-wide setup function for the test case, which is run *once*
1919
/// before any tests are run.
20-
///
21-
/// This function configures the AWS SDK log system to only log errors.
2220
override class func setUp() {
2321
super.setUp()
24-
SDKLoggingSystem.initialize(logLevel: .error)
2522
}
2623

2724
/// A structure containing the results of validating a `Movie` or movie

swift/example_code/dynamodb/ListTables/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.6
1+
// swift-tools-version:5.9
22
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
// SPDX-License-Identifier: Apache-2.0
44

swift/example_code/dynamodb/ListTables/Sources/listtables.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ struct ExampleCommand: ParsableCommand {
4747
func runAsync() async throws {
4848
let session = try DynamoDBSession(region: awsRegion)
4949
let dbManager = DatabaseManager(session: session)
50-
SDKLoggingSystem.initialize(logLevel: .error)
5150

5251
let tableList = try await dbManager.getTableList()
5352

swift/example_code/dynamodb/ListTables/Tests/ListTablesTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ final class ListTablesTests: XCTestCase {
134134
/// This function configures the AWS SDK log system to only log errors.
135135
override class func setUp() {
136136
super.setUp()
137-
SDKLoggingSystem.initialize(logLevel: .error)
138137
}
139138

140139
/// Test fetching a list of table names that's long enough to require

swift/example_code/dynamodb/basics/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.6
1+
// swift-tools-version:5.9
22
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
// SPDX-License-Identifier: Apache-2.0
44

swift/example_code/dynamodb/basics/Tests/MovieTableTests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@ final class MovieTableTests: XCTestCase {
1717
///
1818
/// This function sets up the following:
1919
///
20-
/// Configures the AWS SDK log system to only log errors.
2120
/// Instantiates the service handler, which is used to call
2221
/// Amazon S3 functions.
2322
/// Instantiates the demo cleanup handler, which is used to
2423
/// track the names of the files and buckets created by the tests
2524
/// in order to remove them after testing is complete.
2625
override class func setUp() {
2726
super.setUp()
28-
SDKLoggingSystem.initialize(logLevel: .error)
2927
}
3028

3129
func testInit() async throws {

swift/example_code/iam/AttachRolePolicy/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.5
1+
// swift-tools-version:5.9
22
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
// SPDX-License-Identifier: Apache-2.0
44
//

0 commit comments

Comments
 (0)