Skip to content

Commit

Permalink
Fix STSCredentialsProvider (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 authored Dec 3, 2024
1 parent 37ab536 commit dd17a98
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
matrix:
# This matrix runs tests on Mac, on oldest & newest supported Xcodes
runner:
- macos-12 # x64
- macos-13 # x64
- macos-14
- macos-13-xlarge
Expand All @@ -72,7 +71,6 @@ jobs:
matrix:
# This matrix runs tests on iOS, tvOS & watchOS, on oldest & newest supported Xcodes
runner:
- macos-12 # x64
- macos-13 # x64
- macos-14
- macos-13-xlarge
Expand All @@ -91,8 +89,6 @@ jobs:
# Don't run old macOS with new Xcode
- runner: macos-13-xlarge
xcode: Xcode_15.2
- runner: macos-12
xcode: Xcode_15.2
- runner: macos-13
xcode: Xcode_15.2
# Don't run new macOS with old Xcode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ extension CredentialsProvider.Source {
Self {
let shutdownCallbackCore = ShutdownCallbackCore(shutdownCallback)
var stsOptions = aws_credentials_provider_sts_options()
stsOptions.bootstrap = bootstrap.rawValue
stsOptions.tls_ctx = tlsContext.rawValue
stsOptions.creds_provider = credentialsProvider.rawValue
stsOptions.duration_seconds = UInt16(duration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,17 @@ class CredentialsProviderTests: XCBaseTestCase {
tokenFilePath: "tokenFilePath"))
}

func testCreateDestroyStsInvalidRole() async throws {
func testCreateDestroySts() async throws {
let provider = try CredentialsProvider(source: .static(accessKey: accessKey,
secret: secret,
sessionToken: sessionToken))
XCTAssertThrowsError(try CredentialsProvider(source: .sts(bootstrap: getClientBootstrap(),
_ = try CredentialsProvider(source: .sts(bootstrap: getClientBootstrap(),
tlsContext: getTlsContext(),
credentialsProvider: provider,
roleArn: "invalid-role-arn",
roleArn: "roleArn",
sessionName: "test-session",
duration: 10,
shutdownCallback: getShutdownCallback())))
shutdownCallback: getShutdownCallback()))
}

func testCreateDestroyEcsMissingCreds() async throws {
Expand Down

0 comments on commit dd17a98

Please sign in to comment.