aionnetwork / node_test_harness

A test harness for functional integration testing the Aion kernel(s)
MIT License
0 stars 4 forks source link

check status flag on tx receipts #56

Closed aion-kelvin closed 5 years ago

aion-kelvin commented 5 years ago

If a transaction does not succeed, leaving a receipt that contains status=0, the test harness should signal that some error has happened.

Currently, status flag doesn't seem to be checked, so if a test executes a balance transfer and then asserts that sender account balance has changed, the only feedback given by the test case is the failed assertion.

It would be more meaningful if the test case threw an error (not a failure) if the test case expected the tx to succeed.

aionick commented 5 years ago

Closing this. The TransactionReceipt class now has a transactionWasSuccessful() method that basically reports this status field back to the test. This gives tests an explicit means of checking this.