Skip to content

StoreKitConfigTestCase: delete Bundle.appStoreReceiptURL after every test#1700

Merged
NachoSoto merged 1 commit into
mainfrom
store-kit-tests-remove-receipt
Jun 14, 2022
Merged

StoreKitConfigTestCase: delete Bundle.appStoreReceiptURL after every test#1700
NachoSoto merged 1 commit into
mainfrom
store-kit-tests-remove-receipt

Conversation

@NachoSoto

@NachoSoto NachoSoto commented Jun 14, 2022

Copy link
Copy Markdown
Contributor

Equivalent to #1671 but for unit tests.

In iOS 16 (as of beta 1), the receipt persists across tests, despite the use of SKTestSession.resetToDefaultState.
This might also help with flaky tests pre-iOS 16 too.

Also note that I fixed this method in BaseBackendIntegrationTests. Using URL.absoluteString was incorrect there, so the file was probably never deleted.

I filed a feedback for this:
Screen Shot 2022-06-14 at 11 27 13

…ery test

Equivalent to #1671 but for unit tests.

In iOS 16 (as of beta 1), the receipt persists across tests, despite the use of `SKTestSession.resetToDefaultState`.
This might also help with flaky tests pre-iOS 16 too.

Also note that I fixed this method in `BaseBackendIntegrationTests`. Using `URL.absoluteString` was incorrect there, so the file was probably never deleted.
@NachoSoto NachoSoto requested a review from a team June 14, 2022 17:58
@NachoSoto

Copy link
Copy Markdown
Contributor Author

Tests failures are unrelated to this.

@NachoSoto

Copy link
Copy Markdown
Contributor Author

I wonder if this will make integration tests a lot less flaky (since #1671 wasn't actually working due to the path issue).

@taquitos taquitos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤞 🐐
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants