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

Conversation

cpacia
Copy link
Member

@cpacia cpacia commented Oct 16, 2019

The current way of running tests is:

python3 test_name.py -b /path/to/obgo-binary -d /path/to/bitcoind

This way still works, but a new option is available:

python3 test_name.py -i /path/to/obgo-binary-v1 /path/to/obgo-binary-v2 -d /path/to/bitcoind

Where i is a list of string paths for each ob-go binary that is used. The binaries can be different versions. The number of binaries in the list must be equal to the number of nodes created by the test and the index of the binary string must map to the node (buyer, vendor, moderator) that you want it to map to.

This PR is technically incomplete as it only allows the use of multiple binaries, however all the test data is currently formatted using the current version and not prior versions. Getting the old version shouldn't be difficult as it's just copying and pasting the test data from the old version. However, each test will need to be updated to decide which version of the data file it needs to load and post to the server.

I've added another flag -v that can be used to specify the versions which map to each node. For example:

`-v v1 v2 v2`

Means that node 0 is a v1 node and nodes 2 and 3 are v2 nodes. Each test would need to do something like:

alice = self.nodes[1]

file_path = "testdata/listing.json"
if self.versions is not None and self.versions[1] is "v1":
    file_path = "testdata/listing_old.json"
with open(file_path) as listing_file:
    listing_json = json.load(listing_file, object_pairs_hook=OrderedDict)

@coveralls
Copy link

coveralls commented Oct 16, 2019

Coverage Status

Coverage remained the same at 41.662% when pulling 13d28b1 on compatibilitytest into 09c1138 on ethereum-master.

@drwasho drwasho added ethereum Ethereum integration-related issues. 🚀 🚫 Launch blockers internal Under-the-hood issues labels Oct 16, 2019
@drwasho drwasho requested review from amangale and placer14 October 16, 2019 21:16
@drwasho drwasho added the 🚧 in progress Issue or PR is currently being worked on and not in final form. label Oct 17, 2019
@drwasho drwasho changed the title Update test_framework.py to support version compatibility tests (#1785) Update test_framework.py to support version compatibility tests Oct 27, 2019
@hoffmabc hoffmabc added this to the Ethereum Launch 🚀 milestone Dec 2, 2019
@cpacia cpacia added 🔍 readyForReview Issue or PR ready for code review prior to closing. and removed 🚧 in progress Issue or PR is currently being worked on and not in final form. labels Dec 9, 2019
@cpacia cpacia removed the 🔍 readyForReview Issue or PR ready for code review prior to closing. label Dec 11, 2019
@hoffmabc hoffmabc changed the title (#1785) Update test_framework.py to support version compatibility tests [WIP] (#1785) Update test_framework.py to support version compatibility tests Dec 13, 2019
@hoffmabc hoffmabc changed the title [WIP] (#1785) Update test_framework.py to support version compatibility tests (#1785) Update test_framework.py to support version compatibility tests Dec 13, 2019
@hoffmabc hoffmabc added the 🔍 readyForReview Issue or PR ready for code review prior to closing. label Dec 13, 2019
@hoffmabc
Copy link
Member

@cpacia are there any tests being run against different versions in this PR so far?

@drwasho drwasho linked an issue Mar 4, 2020 that may be closed by this pull request
46 tasks
cpacia and others added 20 commits March 10, 2020 12:57
…-purchases

Fix scientific notation coming out of database for purchases
Check for nil blocknumber when retrieving tx
Changed ReleaseFunds func to check if transaction goes through before saving
This will take a string and encode it as a multihash + convert it to a Base 58 string in the same way we do to our coupons. This makes it easy for clients to determine if a given coupon matches a listing's coupon secret.
…ogressed

Also automatically progress an order contract's state to RESOLVED when a DISPUTE_CLOSE message is found and DisputeAcceptance data is already present on the contract.  This is another fix aimed at fully resolving #1651
 Fix: Save DisputeAcceptance to the contract no matter what
Save and load unconfirmed txs from db
@cpacia
Copy link
Member Author

cpacia commented Mar 23, 2020

v4 tests:

  • cancel_direct_offline
  • chat
  • chat_offline
  • complete_direct_online
  • complete_disputed
  • complete_moderated_online
  • complete_moderated_with_timeout
  • dispute_close_buyer
  • dispute_close_vendor
  • dispute_close_split
  • escrow_release_after_timeout
  • fulfill_direct_online
  • listings
  • manage_crypto_listings
  • market_price_modifier.py
  • out_of_inventory
  • patch_profile
  • purchase_crypto_listing
  • purchase_digital
  • purchase_direct_online
  • purchase_direct_offline
  • purchase_moderated_offline
  • purchase_moderated_online
  • purchase_offline_error
  • receive_coins
  • refund_direct
  • refund_moderated
  • reject_direct_offline
  • reject_moderated_offline
  • smtp_notifications
  • upload_listing

@cpacia cpacia merged commit 04e28bb into ethereum-master Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ethereum Ethereum integration-related issues. internal Under-the-hood issues 🔍 readyForReview Issue or PR ready for code review prior to closing. 🚀 🚫 Launch blockers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create compatibility QA tests for purchasing between v4 and v5 nodes

5 participants