Skip to content

Conversation

@d-xo
Copy link
Contributor

@d-xo d-xo commented Sep 15, 2021

Description

Makes use of bash_unit as a unit test runner for the dapp_tests. This makes working with these tests a little more ergonomic and means we can:

  • esaily run a subset of the tests
  • have slightly more readable assertions
  • get clearer error messages when an assertion does not hold

If you want to hack on the tests, you can cd into src/dapp-tests and entering the nix-shell. From there you can run bash_unit integeration/tests.sh. To run a subset of the tests, you can run bash_unit -p <REGEX> integration/tests.sh.

I also refactored a little bit, and now the tests are organised so that there is a shared instance of dapp testnet running in the background for every test, as well as a helper function fresh_account that generates and funds a new address.

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

@d-xo
Copy link
Contributor Author

d-xo commented Sep 21, 2021

wrote a mini fuzz testing framework and fuzzed a few easy roundtrip properties. Found a bug in --from-fix, and another in --to-fix.

@d-xo d-xo merged commit 4f40b0c into master Sep 21, 2021
@d-xo d-xo deleted the fancy-tests branch September 21, 2021 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants