github.com/mit-dci/lit@v0.0.0-20221102210550-8c3d3b49f2ce/test/README.md (about)

     1  # Lit Integration Tests
     2  
     3  Lit's integration test suite was quite outdated, so as of 2018-08-03 we started
     4  rewriting them.  Now they're waaay cooler and easier to write.
     5  
     6  All of the tests are in Python and built on the the `testlib` library, which
     7  manages creating instances of lit and and bitcoind and getting them to talk to
     8  each other without worrying about the details.
     9  
    10  The actual tests are in each of the `itest_foo.py` files, but don't run them
    11  directly.
    12  
    13  ## Deps
    14  
    15  You'll need the `requests` library, and `bitcoind` on your PATH, but that's
    16  about it.
    17  
    18  ```sh
    19  pip3 install requests
    20  ```
    21  
    22  ## Running the tests
    23  
    24  There's a separate shell script that can manage executing all the tests.  It
    25  also manages setting up data directories for tests, which are stored in `_data`.
    26  
    27  ```sh
    28  ./runtests.py <tests...>
    29  ```
    30  
    31  ## Envvars
    32  
    33  * `LIT_OUTPUT_SHOW` - Tell the testlib to show output from all Lit(s)
    34  
    35  * `LIT_ID_SHOW` - Used with the above, *only* show output from this Lit
    36  
    37  * `LIT_ITEST_ROOT` - Data dir path, only works when running tests directly.
    38  
    39  ## Notes
    40  
    41  Some of the tests have a `_reverse` suffix.  This means that they do mostly the
    42  same thing as the test without the `_reverse` suffix, but the difference between
    43  them is the opposite node closes the channel between the two tests.  For these
    44  the actual test code is probably in `test_combinators.py` and that's used as a
    45  library in the main test script.  You can see the settings in the main script as
    46  as pass slightly different arguments to the function that runs it.