Open drwasho opened 5 years ago
The first batch of work is being done here: https://github.com/OpenBazaar/validation-obgo-tests
This issue is still open as these validations need to be integrated into the QA test suite. A way that might be done is to create 2 more folders in ./qa
from the validation-obgo-tests
repo:
schema
=> contains the schema JSONresponses
=> contains example JSON responses from the server, which we use to infer the schema fromNext, we'd validate the JSON shortly after lines like this: https://github.com/OpenBazaar/openbazaar-go/blob/master/qa/listings.py#L59
Our python QA tests are excellent end-to-end test that replicates a variety of order-related scenarios to ensure that code changes do not break core protocol functionality. However, these tests do not tell us:
This issue proposes that we start testing both! This will give us some confidence that the server is now significantly less likely to give us a false-positive for a given QA test.
As a simple example, for
POST /ob/listing
(i.e. creating a new listing), a typical response would be:We should validate:
slug
A complex example would be
POST /wallet/spend
:Here we should validate:
currency
object