raiden
raiden copied to clipboard
Add resolver related tests
lacking tests for https://github.com/raiden-network/raiden/pull/3713#pullrequestreview-231587165:
- When the resolver is set and the code paths which request the secret from the resolver.
- Refund transfers should fail the transfer.
- If an HTTP exception happens in the resolver (Request timeout for example), the exception will propagate and the payment should fail.
Need to mock the resolver, provide a return value and make sure that the transfer continues normally. Using the mock, you can also just sleep and wait for the http client to timeout and see what happens there.
As for refund transfers, we have a bunch of them here: https://github.com/raiden-network/raiden/blob/master/raiden/tests/integration/transfer/test_refundtransfer.py
From https://github.com/raiden-network/raiden/issues/5022
- Should return
Falseifresolver_endpointis not specified - Should return
Falsewhen the lock expires - Should return
Falsewhen secret is not found in the resolver. - Should dispatch
SecretRevealwhen the request succeeds.