Skip to content

CustomEntitlementComputation: use custom API key#2879

Merged
tonidero merged 3 commits into
mainfrom
toniricodiez/sdk-3238-update-customentitlementcomputation-integration-tests-in-ios
Jul 26, 2023
Merged

CustomEntitlementComputation: use custom API key#2879
tonidero merged 3 commits into
mainfrom
toniricodiez/sdk-3238-update-customentitlementcomputation-integration-tests-in-ios

Conversation

@tonidero

@tonidero tonidero commented Jul 25, 2023

Copy link
Copy Markdown
Contributor

Description

We were using the default API key to test the custom entitlement computation package installation and integration tests. This changes that so we use a special API key with some special behavior in the backend to mimic real scenarios.

@tonidero tonidero added the test label Jul 25, 2023
@codecov

codecov Bot commented Jul 25, 2023

Copy link
Copy Markdown

Codecov Report

Merging #2879 (a1fa5ce) into main (fb15ee6) will decrease coverage by 0.02%.
Report is 5 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2879      +/-   ##
==========================================
- Coverage   86.61%   86.59%   -0.02%     
==========================================
  Files         217      217              
  Lines       15514    15514              
==========================================
- Hits        13437    13434       -3     
- Misses       2077     2080       +3     

see 1 file with indirect coverage changes

@tonidero tonidero marked this pull request as ready for review July 25, 2023 12:42
@tonidero tonidero requested a review from a team July 25, 2023 12:42
@tonidero tonidero marked this pull request as draft July 25, 2023 12:42
@tonidero tonidero marked this pull request as ready for review July 25, 2023 12:54
@NachoSoto

Copy link
Copy Markdown
Contributor

This is useful, although these installation tests only call switchUser.
Could you also override the apiKey in CustomEntitlementsComputationIntegrationTests like we do for LoadShedderStoreKit1IntegrationTests?

@NachoSoto NachoSoto 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.

If tests pass, ship it! Let's see if we need to replicate / change the offering setup in that app.

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.

🏆

@NachoSoto

Copy link
Copy Markdown
Contributor

Thanks for doing this!

@NachoSoto NachoSoto changed the title Use custom entitlement computation API key for installation tests CustomEntitlementComputation: use custom API key Jul 25, 2023
@tonidero

Copy link
Copy Markdown
Contributor Author

We do need to fix the project 😅 Will do so after the meetings today

@NachoSoto

Copy link
Copy Markdown
Contributor

Mainly I think it's the bundle ID in that app is different from the integration tests. Might need to create a separate app with the same integration test bundle ID that's configured in the same way.

@tonidero tonidero force-pushed the toniricodiez/sdk-3238-update-customentitlementcomputation-integration-tests-in-ios branch from c61a513 to a1fa5ce Compare July 25, 2023 17:22
@tonidero tonidero marked this pull request as draft July 25, 2023 17:37
@tonidero tonidero marked this pull request as ready for review July 26, 2023 16:54
@tonidero tonidero merged commit de5aba3 into main Jul 26, 2023
@tonidero tonidero deleted the toniricodiez/sdk-3238-update-customentitlementcomputation-integration-tests-in-ios branch July 26, 2023 16:54
NachoSoto added a commit that referenced this pull request Aug 9, 2023
_This release is compatible with Xcode 15 beta 6 and visionOS beta 3_

### Bugfixes
* `visionOS`: support for `Xcode 15 beta 6` (#2989) via NachoSoto
(@NachoSoto)
* `CachingProductsManager`: avoid crash when caching different products
with same identifier (#2979) via NachoSoto (@NachoSoto)
* `PurchasesOrchestrator`: disambiguate transactions from the queue
(#2890) via NachoSoto (@NachoSoto)
### Performance Improvements
* `StoreKit2TransactionListener`: handle transactions asynchronously
(#2910) via NachoSoto (@NachoSoto)
### Other Changes
* `Atomic`: avoid race conditions modifying dictionaries (#2981) via
NachoSoto (@NachoSoto)
* `Logging`: avoid logging "updating offerings" when request is cached
(#2904) via NachoSoto (@NachoSoto)
* `StoreKit2TransactionListener`: converted into an `actor` (#2909) via
NachoSoto (@NachoSoto)
* `Integration Tests`: added more observer mode tests (#2905) via
NachoSoto (@NachoSoto)
* Created `PostedTransactionCache` (#2911) via NachoSoto (@NachoSoto)
* `IntroEligibility`: changed products to `Set<String>` (#2976) via
NachoSoto (@NachoSoto)
* `AdServices`: Rename `postAdServicesTokenIfNeeded()` to
`postAdServicesTokenOncePerInstallIfNeeded()` (#2968) via Josh Holtz
(@joshdholtz)
* `SK1StoreProduct`: changed `productType` warning to debug (#2957) via
NachoSoto (@NachoSoto)
* `PrivacyInfo.xcprivacy`: added `UserDefaults` to access API types
(#2913) via NachoSoto (@NachoSoto)
* `Integration Tests`: new test to verify that SK1 purchases don't leave
SK2 unfinished transactions (#2906) via NachoSoto (@NachoSoto)
* `Logging`: log entire cache key with verbose logs (#2888) via
NachoSoto (@NachoSoto)
* `StoreProduct`: added test covering warning log (#2897) via NachoSoto
(@NachoSoto)
* `CustomEntitlementComputation`: use custom API key (#2879) via Toni
Rico (@tonidero)
* `CachingProductsManager`: removed duplicate log and added tests
(#2898) via NachoSoto (@NachoSoto)
* `Xcode 15 beta 5`: fixed test compilation (#2885) via NachoSoto
(@NachoSoto)

---------

Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
MarkVillacampa pushed a commit that referenced this pull request Sep 6, 2023
_This release is compatible with Xcode 15 beta 6 and visionOS beta 3_

### Bugfixes
* `visionOS`: support for `Xcode 15 beta 6` (#2989) via NachoSoto
(@NachoSoto)
* `CachingProductsManager`: avoid crash when caching different products
with same identifier (#2979) via NachoSoto (@NachoSoto)
* `PurchasesOrchestrator`: disambiguate transactions from the queue
(#2890) via NachoSoto (@NachoSoto)
### Performance Improvements
* `StoreKit2TransactionListener`: handle transactions asynchronously
(#2910) via NachoSoto (@NachoSoto)
### Other Changes
* `Atomic`: avoid race conditions modifying dictionaries (#2981) via
NachoSoto (@NachoSoto)
* `Logging`: avoid logging "updating offerings" when request is cached
(#2904) via NachoSoto (@NachoSoto)
* `StoreKit2TransactionListener`: converted into an `actor` (#2909) via
NachoSoto (@NachoSoto)
* `Integration Tests`: added more observer mode tests (#2905) via
NachoSoto (@NachoSoto)
* Created `PostedTransactionCache` (#2911) via NachoSoto (@NachoSoto)
* `IntroEligibility`: changed products to `Set<String>` (#2976) via
NachoSoto (@NachoSoto)
* `AdServices`: Rename `postAdServicesTokenIfNeeded()` to
`postAdServicesTokenOncePerInstallIfNeeded()` (#2968) via Josh Holtz
(@joshdholtz)
* `SK1StoreProduct`: changed `productType` warning to debug (#2957) via
NachoSoto (@NachoSoto)
* `PrivacyInfo.xcprivacy`: added `UserDefaults` to access API types
(#2913) via NachoSoto (@NachoSoto)
* `Integration Tests`: new test to verify that SK1 purchases don't leave
SK2 unfinished transactions (#2906) via NachoSoto (@NachoSoto)
* `Logging`: log entire cache key with verbose logs (#2888) via
NachoSoto (@NachoSoto)
* `StoreProduct`: added test covering warning log (#2897) via NachoSoto
(@NachoSoto)
* `CustomEntitlementComputation`: use custom API key (#2879) via Toni
Rico (@tonidero)
* `CachingProductsManager`: removed duplicate log and added tests
(#2898) via NachoSoto (@NachoSoto)
* `Xcode 15 beta 5`: fixed test compilation (#2885) via NachoSoto
(@NachoSoto)

---------

Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants