-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cognito provider tests #3286
base: main
Are you sure you want to change the base?
Cognito provider tests #3286
Conversation
da489d7
to
b2a7581
Compare
88852d6
to
04683fc
Compare
#include <aws/core/utils/Outcome.h> | ||
#include <aws/testing/TestingEnvironment.h> | ||
#include <aws/core/platform/Environment.h> | ||
#include <openssl/sha.h> |
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.
why are we using openssl headers directly, this would create a openssl dependency for tests that we dont want to have. what do we need from openssl that we dont have in c-cal
testTrace.erase(); | ||
} | ||
|
||
private: |
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.
nit: weird spacing on private
} | ||
|
||
private: | ||
Aws::String createUserPool(Aws::String poolName) |
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.
lets use const Aws::String&
since we arent calling move
on it
private: | ||
Aws::String createUserPool(Aws::String poolName) | ||
{ | ||
if(poolName.empty()) |
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.
shouldnt we never call with empty?
|
||
CreateUserPoolOutcome userPoolOutcome = client->CreateUserPool(userPoolRequest); | ||
if (!userPoolOutcome.IsSuccess()) { | ||
return {}; |
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.
this is a test so we should expecting/asserting service outcomes with with either AWS_ASSERT_SUCCESS
or AWS_EXPECT_SUCCESS
|
||
auto deletePoolOutcome = client->DeleteUserPool(deletePoolRequest); | ||
if (!deletePoolOutcome.IsSuccess()) { | ||
AWS_LOGSTREAM_ERROR(ALLOCATION_TAG, "Failed to delete User Pool: " << deletePoolOutcome.GetError().GetMessage()); |
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.
yeah last comment ill leave on this we shoudlnt be logging errors, this is a test therefore we want to assert/expecting
} | ||
~SRPClient() | ||
{ | ||
BN_free(N); |
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.
yeah we cant be using linux/openssl symbols otherwise this wont work on windows. also we dont want to make the tests depedent on being run in linux or a direct open ssl depedency.
For crypto try to only use our utility classes, which invokes aws-c-cal instead of taking on a direct crypto dependency.
any crypto related functionality should be flowing through the CRT
Issue #, if available:
Description of changes:
Add Integration tests for cognito-idp
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.