xpring-eng / XpringKit

XpringKit provides a Swift SDK for interacting with Xpring Protocols (XRP/PayID/ILP). This library is deprecated.
https://xrpl.org/
MIT License
26 stars 14 forks source link

Implements `randomWalletFromFaucet` for Improved `XRPClient` Integration Tests #267

Closed amiecorso closed 4 years ago

amiecorso commented 4 years ago

High Level Overview of Change

This PR implements the test utility randomWalletFromFaucet, which generates a random wallet and then requests funds via the XRPL Testnet faucet (https://xrpl.org/xrp-testnet-faucet.html). Integration tests are refactored to use a new funded address each time, which should eliminate the failures that occur due to sequence number clashes when different clients (via different CI runs) send transactions on behalf of the same account.

Context of Change

Type of Change

Before / After

New addresses are used for integration tests where relevant.

Test Plan

Refactor integration tests where necessary. CI still passes.

codecov[bot] commented 4 years ago

Codecov Report

Merging #267 into master will increase coverage by 0.44%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #267      +/-   ##
==========================================
+ Coverage   90.01%   90.45%   +0.44%     
==========================================
  Files          42       43       +1     
  Lines         951      985      +34     
==========================================
+ Hits          856      891      +35     
+ Misses         95       94       -1     
Impacted Files Coverage Δ
XpringKit/XRP/DefaultXRPClient.swift 98.14% <100.00%> (+0.13%) :arrow_up:
XpringKit/XRP/Model/AccountRootFlag.swift 100.00% <100.00%> (ø)
XpringKit/XRP/Model/PaymentFlag.swift 100.00% <100.00%> (ø)
...l/XRPTransaction+Org_Xrpl_Rpc_V1_Transaction.swift 96.00% <100.00%> (ø)
XpringKit/XRP/RawTransactionStatus.swift 100.00% <100.00%> (ø)
XpringKit/XRP/ReliableSubmissionXRPClient.swift 95.77% <100.00%> (+1.33%) :arrow_up:
XpringKit/XRP/XRPClient.swift 100.00% <100.00%> (ø)
XpringKit/XRP/WalletGenerationResult.swift 80.00% <0.00%> (+20.00%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2c9b64e...f9559c5. Read the comment docs.