reactivate CLN integration tests

This commit is contained in:
daywalker90
2024-06-16 23:38:49 +02:00
parent 92ada26f4a
commit 56346a612f
3 changed files with 24 additions and 4 deletions

View File

@ -22,8 +22,8 @@ jobs:
matrix:
python-tag: ['3.12.3-slim-bookworm', '3.13-rc-slim-bookworm']
lnd-version: ['v0.17.4-beta']
cln-version: ['v23.11.2'] #,'v24.02']
ln-vendor: ['LND'] #, 'CLN']
cln-version: ['v24.05']
ln-vendor: ['LND', 'CLN']
steps:
- name: 'Checkout'
@ -56,7 +56,6 @@ jobs:
env:
LND_VERSION: ${{ matrix.lnd-version }}
CLN_VERSION: ${{ matrix.cln-version }}
BITCOIND_VERSION: ${{ matrix.bitcoind-version }}
ROBOSATS_ENVS_FILE: ".env-sample"
- name: Wait for coordinator (django server)

View File

@ -3,6 +3,8 @@
# Some useful handy commands that hopefully are never needed
# docker-compose -f docker-tests.yml --env-file tests/compose.env down --volumes
# docker exec -it btc bitcoin-cli -chain=regtest -rpcpassword=test -rpcuser=test createwallet default
# docker exec -it btc bitcoin-cli -chain=regtest -rpcpassword=test -rpcuser=test -generate 101
@ -27,6 +29,8 @@ services:
- "6379:6379"
volumes:
- bitcoin:/bitcoin/.bitcoin/
- ./tests/bitcoind/entrypoint.sh:/entrypoint.sh
entrypoint: ["/entrypoint.sh"]
command:
--txindex=1
--printtoconsole
@ -86,7 +90,7 @@ services:
- cln:/root/.lightning
- ./docker/cln/plugins/holdinvoice:/root/.lightning/plugins/holdinvoice
- bitcoin:/root/.bitcoin
command: --regtest --wumbo --bitcoin-rpcuser=test --bitcoin-rpcpassword=test --log-level=debug --rest-host=0.0.0.0 --rest-port=3010 --bind-addr=127.0.0.1:9737 --max-concurrent-htlcs=483 --grpc-port=9999 --grpc-hold-port=9998 --important-plugin=/root/.lightning/plugins/holdinvoice --database-upgrade=true
command: --regtest --bitcoin-rpcuser=test --bitcoin-rpcpassword=test --developer --dev-bitcoind-poll=1 --dev-fast-gossip --log-level=debug --bind-addr=127.0.0.1:9737 --max-concurrent-htlcs=483 --grpc-port=9999 --grpc-hold-port=9998 --important-plugin=/root/.lightning/plugins/holdinvoice --database-upgrade=true
depends_on:
- bitcoind
network_mode: service:bitcoind

17
tests/bitcoind/entrypoint.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
# Start bitcoind in the background
bitcoind "$@" &
# Wait for bitcoind to be ready
while ! bitcoin-cli --regtest --rpcuser=test --rpcpassword=test getblockchaininfo 2>/dev/null | grep '"verificationprogress":'; do
echo "Waiting for bitcoind to be ready..."
sleep 1
done
# Run initialization commands
bitcoin-cli --regtest --rpcuser=test --rpcpassword=test createwallet default
bitcoin-cli --regtest --rpcuser=test --rpcpassword=test generatetoaddress 1 $(bitcoin-cli --regtest --rpcuser=test --rpcpassword=test getnewaddress)
# Bring bitcoind to the foreground
wait