-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add more token tests #7776
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
Add more token tests #7776
Conversation
|
@paulb777 I think chen/fm-master is corrupted, and chen/token-add-test has the right latest version of code. |
|
Looks like github UI now reflected that it's fixed by itself magically. |
Coverage ReportAffected SDKs
Test Logs
|
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 on CI green, but I didn't review all the tests in too much details assuming that these are mostly existing tests moved to FCM. Please let me know if you need more detailed review for some part of the changes.
| [super tearDown]; | ||
| } | ||
|
|
||
| - (void)testTokenInfoCreationWithInvalidArchive { |
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.
I'm not sure what we are actually testing by this test? Looks like only behaviour of deprecated [NSKeyedUnarchiver unarchiveObjectWithData:badData] method is tested. I would consider removing it.
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.
Done.
| FIRMessagingTokenInfo *info = self.validTokenInfo; | ||
| #pragma clang diagnostic push | ||
| #pragma clang diagnostic ignored "-Wdeprecated-declarations" | ||
| NSData *archive = [NSKeyedArchiver archivedDataWithRootObject:info]; |
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.
optional: I would suggest using GULSecureCoding to avoid using deprecated API when unnecessary (here and at similar places).
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.
that's on my todo list next because we did introduce the NSCoding from IID to Messaging that we should migrate to NSSecureCoding.
Move the following token class tests from IID to Messaging
TokenInfo
TokenOperation
TokenStore
Utilities
#no-changelog