appstore-notifications-go icon indicating copy to clipboard operation
appstore-notifications-go copied to clipboard

Fix bug handling test notification

Open miedda opened this issue 1 year ago • 4 comments

This commit adds checks to verify that the notification has non-empty strings in the SignedTransactionInfo and SignedRenewalInfo fields. This check allows the test notification, which does have values for these fields to be populated. Without these checks a panic occurs as the tokens for the fields cannot be parsed correctly.

miedda avatar Dec 03 '23 06:12 miedda

Hi @miedda , Thanks for your contribution. Could you please also write a test for your updates?

Thanks.

izniburak avatar Dec 03 '23 20:12 izniburak

I have added a test as requested. I have followed the same pattern as the existing test, and am pulling the request from the local environment. It needs to be generated by requesting a test notification via the app store server API. I also had to modify the existing test to skip if the environment variables are not available.

miedda avatar Dec 04 '23 09:12 miedda

Hello contributors! Just tried this golang package and also noticed the panic when testing it with apples TestNotification. Do you have any ETA on this release?

pfm-hampus avatar Feb 07 '24 17:02 pfm-hampus

Hi @pfm-hampus , I would merge this PR, but wrong files/lines have been changed in the PR. So, I'll prepare a new PR for the TestNotifications ASAP. Please wait for the next release!

Thanks.

izniburak avatar Feb 09 '24 19:02 izniburak