Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

QA Tests to protect Blockbook interoperability #1512

Open
3 tasks
placer14 opened this issue Mar 21, 2019 · 1 comment
Open
3 tasks

QA Tests to protect Blockbook interoperability #1512

placer14 opened this issue Mar 21, 2019 · 1 comment
Labels
feature Feature or enhancement to openbazaar-go

Comments

@placer14
Copy link
Member

placer14 commented Mar 21, 2019

In order to protect expected behavior between ob-go and the multiwallet API, we want to create a set of tests which will exercise the actual scenarios through which the API is expected to normally perform on a coin-by-coin basis. The tests should be implemented as an independent suite of tests which are exercised against a live blockbook API.

The test creators should take care that ob-go assurances aren't leaking into the tests and should only be assured when required to test a specific scenario as it relates to the blockbook API. (For example, we assert a node is offline to ensure the production of a 1-of-2 transaction and don't care as much that the node was offline so much as we care that it allowed the 1-of-2 transaction to take place. This is important from the perspective of naming functions and variables as part of the description of the test. In this case, I would prefer a function called AssertNodePreparedForOneOfTwoMultisig() instead of AssertNodeOffline().

Requirements:

  • Tests should separate tests by coin and then by scenario
  • Tests should allow individual coin support to be exercised independently against a specific API endpoint
  • Each test should isolate the scenario to a specific behavior and not overload a test with asserting multiple behaviors at once (each asserted behavior should independently fail)

Scenarios:

  • Fund and Get Balance
  • Get block height info
  • Get transaction by hash
  • Send direct payment
  • Send 1-of-2 payment
  • Send 2-of-3 payment
  • Test sweep wallet
  • TBD...

This will require the builder MVP: OpenBazaar/mason#1

@placer14 placer14 added the feature Feature or enhancement to openbazaar-go label Mar 21, 2019
@placer14
Copy link
Member Author

placer14 commented Apr 9, 2019

I want to investigate whether we can use regtest BB servers in these tests to better manage making and verifying payments. (See OpenBazaar/multiwallet#76)

On further investigation, it appears the build scripts for blockbook involve complex build, deb installation, and docker orchestration. This might be a tall order for the short term, so we will not try to create a deterministic blockbook instance to test again. Instead, the test script will check that the wallet has sufficient funds before executing tests dependent on coin use.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature or enhancement to openbazaar-go
Projects
None yet
Development

No branches or pull requests

1 participant