-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Add sso credentials integration test #1129
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing huge, just a few small issues to address
IntegrationTests/Services/AWSS3IntegrationTests/SSOCredentialsProviderTests.swift
Show resolved
Hide resolved
managedPolicyArn: awsReadOnlyPolicy, | ||
permissionSetArn: permissionSetArn)) | ||
} catch let error as AWSSSOAdmin.ConflictException { | ||
if error.message == "PermissionSet with name \(permissionSetName) already exists." { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assume error messages can change at any time. Is there a more reliable way to verify this error condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently there's no other way to check the specific cause for the error other than checking the message contained int he error. So as a workaround I now look for smaller substring using contains()
to reduce dependency on the entire error message string staying the same. Now it only checks that \(permissionSetName) already exists
is part of the error message.
IntegrationTests/Services/AWSS3IntegrationTests/SSOCredentialsProviderTests.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic looks good but would like to clean up large helper function
IntegrationTests/Services/AWSS3IntegrationTests/SSOCredentialsProviderTests.swift
Outdated
Show resolved
Hide resolved
IntegrationTests/Services/AWSS3IntegrationTests/SSOCredentialsProviderTests.swift
Outdated
Show resolved
Hide resolved
IntegrationTests/Services/AWSS3IntegrationTests/SSOCredentialsProviderTests.swift
Outdated
Show resolved
Hide resolved
IntegrationTests/Services/AWSS3IntegrationTests/SSOCredentialsProviderTests.swift
Outdated
Show resolved
Hide resolved
IntegrationTests/Services/AWSS3IntegrationTests/SSOCredentialsProviderTests.swift
Outdated
Show resolved
Hide resolved
IntegrationTests/Services/AWSS3IntegrationTests/SSOCredentialsProviderTests.swift
Outdated
Show resolved
Hide resolved
IntegrationTests/Services/AWSS3IntegrationTests/SSOCredentialsProviderTests.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/test |
Issue #
N/A
Description of changes
Adds integration test for
SSOCredentialsProvider
that usesS3::listBuckets
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.