Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail tests early when "storage" not enabled #1563

Merged
merged 5 commits into from
Nov 22, 2023
Merged

Conversation

tadzik
Copy link
Contributor

@tadzik tadzik commented Nov 3, 2023

Description of change

The tests currently fail in confusing ways, due to "storage" not being enabled by default in bindings. Curiously, it does seem to be enabled in the wallet (running this code, and causing test failures when ran concurrently), breaking the functionality of each test using a custom, unique storage location.

This makes the test fail early (in compile time) if storage is not enabled, which makes sense given how heavily they rely on it. README now also documents how the tests should be run (we cannot force it, apparently).

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Bug fix – in case storage was disabled in bindings but used in the code
  • Documentation Fix

How the change has been tested

cargo test now passes in rootdir when "storage" is enabled

Change checklist

Tick the boxes that are relevant to your changes, and delete any items that are not.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have checked that new and existing unit tests pass locally with my changes

Tadeusz „tadzik” Sośnierz added 2 commits November 3, 2023 13:52
This allows us to fail early if the storage feature is not enabled,
rather than having code which appears to work but doesn't.

Signed-off-by: Tadeusz „tadzik” Sośnierz <[email protected]>
README.md Outdated Show resolved Hide resolved
@thibault-martinez thibault-martinez merged commit 7cc9bc7 into 2.0 Nov 22, 2023
1 check passed
@thibault-martinez thibault-martinez deleted the fail-tests-early branch November 22, 2023 10:09
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.

4 participants