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

Fix broken tests on elements and various cleanups #3568

Merged
merged 10 commits into from
Mar 23, 2020

Commits on Mar 19, 2020

  1. pytest: Actually make sure that the direcory exists

    Some tests may not spawn a node at all, so make sure that our assumption that
    the directory exists in the fixture cleanup is correct by creating the
    directory.
    cdecker committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    b5a41f9 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2020

  1. tx: Strengthen transaction construction checks

    We roll the `elements_add_fee_output` function and the cropping of
    overallocated arrays into the `bitcoin_tx_finalize` function. This is supposed
    to be the final cleanup and compaction step before a tx can be sent to bitcoin
    or passed off to other daemons.
    
    This is the cleanup promised in ElementsProject#3491
    cdecker committed Mar 23, 2020
    Configuration menu
    Copy the full SHA
    3eaa7a5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8549308 View commit details
    Browse the repository at this point in the history
  3. pyln: Migrate remaining uses of the deprecated pylightning module

    `pylightning` is not much more than an alias for `pyln-client`, so this
    removes the need to install that as well just to run the tests.
    cdecker committed Mar 23, 2020
    Configuration menu
    Copy the full SHA
    9aeb501 View commit details
    Browse the repository at this point in the history
  4. pyln-testing: Print a list of files if we can't remove the test dir

    For some reason we fail to remove the test directory in some cases. My
    hypothesis is that it is a daemon that is not completely shut down yet, and
    still writes to the directory. This commit intercepts the error, prints any
    files in the directory and re-raises the error. This should allow us to debug
    the reappears.
    cdecker committed Mar 23, 2020
    Configuration menu
    Copy the full SHA
    374d4ee View commit details
    Browse the repository at this point in the history
  5. pytest: Configure logging in a fixture to match stdout capturing

    pytest captures the output by monkey patching out `sys.stdout`. This may
    conflict with our use of `sys.stdout` when configuring logging, resulting in
    the "Write to closed file" issue that is spamming the logs. By making the
    logging configuration a fixture hopefully we always use the correct
    stdout (after pytest has monkey-patched it).
    cdecker committed Mar 23, 2020
    Configuration menu
    Copy the full SHA
    f5bb709 View commit details
    Browse the repository at this point in the history
  6. pytest: Unbreak the test_feerate_spam test for elementsd

    Looking for specific feerates, but not adjusting the amounts involved doesn't
    work.
    cdecker committed Mar 23, 2020
    Configuration menu
    Copy the full SHA
    136ec7a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    378037c View commit details
    Browse the repository at this point in the history
  8. json-rpc: Fix test_txprepare if running with postgres

    Postgres does not guarantee that the insertion order is the returned order,
    which leads us to skip outputs that have already been stolen onto the selected
    utxos set, but not added to it because it isn't confirmed. This may also
    happen with sqlite3 though it's a lot rarer in that case.
    cdecker committed Mar 23, 2020
    Configuration menu
    Copy the full SHA
    1c3037f View commit details
    Browse the repository at this point in the history
  9. pytest: Fix test_closing_fee regression in elements

    Constants once again.
    cdecker committed Mar 23, 2020
    Configuration menu
    Copy the full SHA
    c85988f View commit details
    Browse the repository at this point in the history