alexbosworth / ln-service

Node.js interface to LND
MIT License
318 stars 61 forks source link

Unable to run tests #144

Closed twshelton closed 3 years ago

twshelton commented 3 years ago

I'm working on a PR for this repo and haven't been able to get the tests to run successfully. Running the wallet-integration-tests results in this for all the tests:

I'm running an M1 Macbook with BTCD/LND running in docker.

Any thoughts?

` `` FAIL test/walletrpc-integration/test_sign_psbt.js ✖ spawn btcd ENOENT

test: TAP at: line: 269 column: 19 file: internal/child_process.js function: Process.ChildProcess._handle.onexit errno: -2 code: ENOENT syscall: spawn btcd path: btcd spawnargs:

alexbosworth commented 3 years ago

it will spawn btcd and lnd itself so maybe it's the docker aspect that is interfering?

alexbosworth commented 3 years ago

I have another project for using docker but it hasn't been integrated yet: https://github.com/alexbosworth/ln-docker-daemons

twshelton commented 3 years ago

I have shut down the docker processes and receive the same errors.

alexbosworth commented 3 years ago

Another thing I would check on is your path, like which btcd and which lnd to make sure the go binaries can be found in test execution

twshelton commented 3 years ago

ah, ok ... since those are running in Docker, I don't have the binaries locally. This PR is simply exporting a reference to a method in the the lightning package. I have BTC/LND running in docker version and also on raspiblitz. Could I simply run the tests from inside one of those environments?

alexbosworth commented 3 years ago

I'm not sure what you are writing but if you are writing something for the lightning package, the model there instead is to just use unit tests which don't require btcd/lnd

Otherwise I think you could use docker in various different ways but I'm not really a docker expert so not sure how to deploy it

twshelton commented 3 years ago

I was able to get the tests to run in the lightning package ... all good there. I'll experiment with a couple of different options and see what I can find.

alexbosworth commented 3 years ago

I added the integration test here: https://github.com/alexbosworth/ln-service/blob/master/test/integration/test_get_wallet_status.js

twshelton commented 3 years ago

Much appreciated!!!!