Skip to content

Added TransactionPoster tests#2557

Merged
NachoSoto merged 2 commits into
mainfrom
transaction-poster-tests
May 30, 2023
Merged

Added TransactionPoster tests#2557
NachoSoto merged 2 commits into
mainfrom
transaction-poster-tests

Conversation

@NachoSoto

Copy link
Copy Markdown
Contributor

Follow up to #2540.
We could add more tests (which are a lot simpler than PurchasesOrchestratorTests) but this is just a start.

@codecov

codecov Bot commented May 26, 2023

Copy link
Copy Markdown

Codecov Report

Merging #2557 (7d52ca6) into main (de47c57) will decrease coverage by 0.06%.
The diff coverage is 97.52%.

❗ Current head 7d52ca6 differs from pull request most recent head 866eb37. Consider uploading reports for the commit 866eb37 to get more accurate results

@@            Coverage Diff             @@
##             main    #2557      +/-   ##
==========================================
- Coverage   87.97%   87.91%   -0.06%     
==========================================
  Files         201      201              
  Lines       13941    13881      -60     
==========================================
- Hits        12265    12204      -61     
- Misses       1676     1677       +1     
Impacted Files Coverage Δ
Sources/Purchasing/Purchases/Purchases.swift 77.48% <ø> (-0.12%) ⬇️
...s/Purchasing/Purchases/PurchasesOrchestrator.swift 85.31% <96.20%> (ø)
Sources/Networking/Backend.swift 88.63% <100.00%> (ø)
Sources/Networking/CustomerAPI.swift 100.00% <100.00%> (ø)
...tworking/Operations/PostReceiptDataOperation.swift 91.85% <100.00%> (ø)
...urces/Purchasing/Purchases/TransactionPoster.swift 100.00% <100.00%> (ø)

... and 6 files with indirect coverage changes

@NachoSoto NachoSoto force-pushed the transaction-poster-tests branch from 1dd44bb to 680234a Compare May 26, 2023 22:56
@NachoSoto NachoSoto force-pushed the transaction-poster-3 branch from 55a39c0 to 397edda Compare May 26, 2023 22:57
@NachoSoto NachoSoto force-pushed the transaction-poster-tests branch from 680234a to 7d52ca6 Compare May 26, 2023 22:57
Base automatically changed from transaction-poster-3 to main May 30, 2023 19:16
@NachoSoto NachoSoto force-pushed the transaction-poster-tests branch from 7d52ca6 to 4accc1d Compare May 30, 2023 19:19
@NachoSoto NachoSoto enabled auto-merge (squash) May 30, 2023 19:23
Follow up to #2540.
We could add more tests (which are a lot simpler than `PurchasesOrchestratorTests`) but this is just a start.
@NachoSoto NachoSoto force-pushed the transaction-poster-tests branch from 4accc1d to 544d7bb Compare May 30, 2023 19:42
@NachoSoto NachoSoto merged commit 81a867a into main May 30, 2023
@NachoSoto NachoSoto deleted the transaction-poster-tests branch May 30, 2023 20:22
This was referenced May 31, 2023
@NachoSoto NachoSoto mentioned this pull request May 31, 2023
NachoSoto added a commit that referenced this pull request Jun 1, 2023
**This is an automatic release.**

### New Features
* `Offline Entitlements`: use offline-computed `CustomerInfo` when
server is down (#2368) via NachoSoto (@NachoSoto)

### Bugfixes
* `AppleReceipt.debugDescription`: don't pretty-print JSON (#2564) via
NachoSoto (@NachoSoto)
* `SK2StoreProduct`: fix crash on iOS 12 (#2565) via NachoSoto
(@NachoSoto)
* `GetCustomerInfo` posts receipts if there are pending transactions
(#2533) via NachoSoto (@NachoSoto)
### Performance Improvements
* `PurchasedProductsFetcher`: cache current entitlements (#2507) via
NachoSoto (@NachoSoto)
* Performance: new check to ensure serialization / deserialization is
done from background thread (#2496) via NachoSoto (@NachoSoto)
### Dependency Updates
* Bump fastlane from 2.212.2 to 2.213.0 (#2544) via dependabot[bot]
(@dependabot[bot])
### Other Changes
* `CustomerInfoManager`: post all unfinished transactions (#2563) via
NachoSoto (@NachoSoto)
* `PostReceiptOperation`: added ability to also post `AdServices` token
(#2566) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: improved computation log (#2562) via NachoSoto
(@NachoSoto)
* Added `TransactionPoster` tests (#2557) via NachoSoto (@NachoSoto)
* Refactored `TransactionPoster`: removed 2 dependencies and abstracted
parameters (#2542) via NachoSoto (@NachoSoto)
* `CustomerInfoManagerTests`: wait for `getAndCacheCustomerInfo` to
finish (#2555) via NachoSoto (@NachoSoto)
* `StoreTransaction`: implemented `description` (#2556) via NachoSoto
(@NachoSoto)
* `Backend.ResponseHandler` is now `@Sendable` (#2541) via NachoSoto
(@NachoSoto)
* Extracted `TransactionPoster` from `PurchasesOrchestrator` (#2540) via
NachoSoto (@NachoSoto)
* `enableAdServicesAttributionTokenCollection`: added integration test
(#2551) via NachoSoto (@NachoSoto)
* `AttributionPoster`: replaced hardcoded strings with constants (#2548)
via NachoSoto (@NachoSoto)
* `DefaultDecodable`: moved to `Misc/Codable/DefaultDecodable.swift`
(#2528) via NachoSoto (@NachoSoto)
* `CircleCI`: specify device to run `backend_integration_tests` (#2547)
via NachoSoto (@NachoSoto)
* Created `StoreKit2TransactionFetcher` (#2539) via NachoSoto
(@NachoSoto)
* Fix load shedder integration tests (#2546) via Josh Holtz
(@joshdholtz)
* Fix doc on `Offering.getMetadataValue` (#2545) via Josh Holtz
(@joshdholtz)
* Extracted and tested `AsyncSequence.extractValues` (#2538) via
NachoSoto (@NachoSoto)
* `Offline Entitlements`: don't compute offline `CustomerInfo` when
purchasing a consumable products (#2522) via NachoSoto (@NachoSoto)
* `OfflineEntitlementsManager`: disable offline `CustomerInfo` in
observer mode (#2520) via NachoSoto (@NachoSoto)
* `BasePurchasesTests`: fixed leak detection (#2534) via NachoSoto
(@NachoSoto)
* `PurchaseTesterSwiftUI`: added `ProxyView` to `iOS` (#2531) via
NachoSoto (@NachoSoto)
* `PurchasedProductsFetcher`: removed `AppStore.sync` call (#2521) via
NachoSoto (@NachoSoto)
* `PurchaseTesterSwiftUI`: added new window on Mac to manage proxy
(#2518) via NachoSoto (@NachoSoto)
* `PurchasedProductsFetcher`: added log if fetching purchased products
is slow (#2515) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: disable for custom entitlements mode (#2509)
via NachoSoto (@NachoSoto)
* `Offline Entitlements`: fixed iOS 12 tests (#2514) via NachoSoto
(@NachoSoto)
* `PurchasedProductsFetcher`: don't throw errors if purchased products
were found (#2506) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: allow creating offline `CustomerInfo` with
empty `ProductEntitlementMapping` (#2504) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: integration tests (#2501) via NachoSoto
(@NachoSoto)
* `CustomerInfoManager`: don't cache offline `CustomerInfo` (#2378) via
NachoSoto (@NachoSoto)
* `DangerousSettings`: debug-only `forceServerErrors` (#2486) via
NachoSoto (@NachoSoto)
* `CocoapodsInstallation`: fixed `Xcode 14.3.0` issue (#2489) via
NachoSoto (@NachoSoto)
* `CarthageInstallation`: removed workaround (#2488) 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