Skip to content
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

IntegrationTests: actually fail test if tests aren't configured #210

Merged
merged 2 commits into from
Aug 19, 2022

Conversation

NachoSoto
Copy link
Contributor

@NachoSoto NachoSoto commented Aug 19, 2022

Looks like calling XCTFail followed by throwing an error was making the test continue for some reason, which was then making it crash instead because Purchases.shared isn't set.
By removing the XCTFail, XCTest now correctly sees this as a test failure and doesn't run the tests.

Looks like calling `XCTFail` followed by throwing an error was making the test continue for some reason, which was then making it crash instead because `Purchases.shared` isn't set.
By removing the `XCTFail`, `XCTest` now correctly sees this as a test failure and doesn't run the tests.
@NachoSoto NachoSoto added the test label Aug 19, 2022
@NachoSoto NachoSoto requested a review from a team August 19, 2022 18:50
NachoSoto added a commit to RevenueCat/purchases-ios that referenced this pull request Aug 19, 2022
Looks like calling `XCTFail` followed by throwing an error was making the test continue for some reason, which was then making it crash instead because `Purchases.shared` isn't set.
By removing the `XCTFail`, `XCTest` now correctly sees this as a test failure and doesn't run the tests.

See also RevenueCat/purchases-hybrid-common#210
Copy link
Contributor

@taquitos taquitos left a comment

Choose a reason for hiding this comment

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

Wow, that's so weird, good catch though.
Failure

@NachoSoto NachoSoto merged commit 375e9b9 into main Aug 19, 2022
@NachoSoto NachoSoto deleted the integration-test-failure branch August 19, 2022 20:39
@RCGitBot RCGitBot mentioned this pull request Aug 22, 2022
@vegaro vegaro added pr:other and removed pr:test labels Sep 17, 2024
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.

3 participants