Skip to content

Commit dd17a98

Browse files
authored
Fix STSCredentialsProvider (#301)
1 parent 37ab536 commit dd17a98

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
matrix:
5050
# This matrix runs tests on Mac, on oldest & newest supported Xcodes
5151
runner:
52-
- macos-12 # x64
5352
- macos-13 # x64
5453
- macos-14
5554
- macos-13-xlarge
@@ -72,7 +71,6 @@ jobs:
7271
matrix:
7372
# This matrix runs tests on iOS, tvOS & watchOS, on oldest & newest supported Xcodes
7473
runner:
75-
- macos-12 # x64
7674
- macos-13 # x64
7775
- macos-14
7876
- macos-13-xlarge
@@ -91,8 +89,6 @@ jobs:
9189
# Don't run old macOS with new Xcode
9290
- runner: macos-13-xlarge
9391
xcode: Xcode_15.2
94-
- runner: macos-12
95-
xcode: Xcode_15.2
9692
- runner: macos-13
9793
xcode: Xcode_15.2
9894
# Don't run new macOS with old Xcode

Source/AwsCommonRuntimeKit/auth/credentials/CredentialsProvider.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ extension CredentialsProvider.Source {
483483
Self {
484484
let shutdownCallbackCore = ShutdownCallbackCore(shutdownCallback)
485485
var stsOptions = aws_credentials_provider_sts_options()
486+
stsOptions.bootstrap = bootstrap.rawValue
486487
stsOptions.tls_ctx = tlsContext.rawValue
487488
stsOptions.creds_provider = credentialsProvider.rawValue
488489
stsOptions.duration_seconds = UInt16(duration)

Test/AwsCommonRuntimeKitTests/auth/CredentialsProviderTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,17 +221,17 @@ class CredentialsProviderTests: XCBaseTestCase {
221221
tokenFilePath: "tokenFilePath"))
222222
}
223223

224-
func testCreateDestroyStsInvalidRole() async throws {
224+
func testCreateDestroySts() async throws {
225225
let provider = try CredentialsProvider(source: .static(accessKey: accessKey,
226226
secret: secret,
227227
sessionToken: sessionToken))
228-
XCTAssertThrowsError(try CredentialsProvider(source: .sts(bootstrap: getClientBootstrap(),
228+
_ = try CredentialsProvider(source: .sts(bootstrap: getClientBootstrap(),
229229
tlsContext: getTlsContext(),
230230
credentialsProvider: provider,
231-
roleArn: "invalid-role-arn",
231+
roleArn: "roleArn",
232232
sessionName: "test-session",
233233
duration: 10,
234-
shutdownCallback: getShutdownCallback())))
234+
shutdownCallback: getShutdownCallback()))
235235
}
236236

237237
func testCreateDestroyEcsMissingCreds() async throws {

0 commit comments

Comments
 (0)