raiden icon indicating copy to clipboard operation
raiden copied to clipboard

Add resolver related tests

Open offerm opened this issue 6 years ago • 0 comments

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 False if resolver_endpoint is not specified
  • Should return False when the lock expires
  • Should return False when secret is not found in the resolver.
  • Should dispatch SecretReveal when the request succeeds.

offerm avatar Apr 29 '19 11:04 offerm