Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-4430

AwsAuthenticationTests.AwsSdk_should_support_all_required_handlers throws if only basic AWS credentials are defined in ~/.aws/credentials

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.19.0
    • Affects Version/s: None
    • Component/s: Security, Testing
    • Labels:
      None
    • Fully Compatible

      If ~/.aws/credentials only contains aws_access_key_id and aws_secret_access_key, but no aws_session_token, the test fails with the following stack trace:

      Expected type to be Amazon.Runtime.SessionAWSCredentials, but found Amazon.Runtime.BasicAWSCredentials.
         at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
         at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
         at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
         at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
         at FluentAssertions.Types.TypeAssertions.Be(Type expected, String because, Object[] becauseArgs)
         at FluentAssertions.Primitives.ReferenceTypeAssertions`2.BeOfType(Type expectedType, String because, Object[] becauseArgs)
         at FluentAssertions.Primitives.ReferenceTypeAssertions`2.BeOfType[T](String because, Object[] becauseArgs)
         at MongoDB.Driver.Tests.Communication.Security.AwsAuthenticationTests.AwsSdk_should_support_all_required_handlers() in /Users/james/Dropbox/code/mongodb/mongo-csharp-driver/tests/MongoDB.Driver.Tests/Communication/Security/AwsAuthenticationTests.cs:line 102 

      This test should allow both BasicAWSCredentials and SessionAWSCredentials to be configured.

            Assignee:
            james.kovacs@mongodb.com James Kovacs
            Reporter:
            james.kovacs@mongodb.com James Kovacs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: