19 releases

new 0.1.25 Dec 6, 2025
0.1.24 Dec 6, 2025
0.1.18 Nov 30, 2025
0.1.10 Oct 21, 2025

#694 in Authentication


Used in 2 crates

Apache-2.0

35KB
879 lines

Testing

Docker-based regtest environment for testing with Lightning Network nodes (CLN, LND), Bitcoin Core, and databases.

Local Testing

  1. Start services:

    cd testing
    docker compose --env-file ./testing.env up -d --build --wait 
    
  2. Copy environment configuration:

    cp testing/testing.env ./testing.env
    
  3. Edit testing.env and change all service names to localhost:

CLN_HOSTNAME=localhost
CREDENTIALS_SERVER_HOSTNAME=localhost
LND_HOSTNAME=localhost
MYSQL_HOSTNAME=localhost
POSTGRES_HOSTNAME=localhost
  1. Run tests:
    cargo test
    

Docker-in-Docker CI Testing

For running tests inside a container with Docker socket access.

  1. Start services:

    cd testing
    docker compose --env-file ./testing.env up -d --build --wait 
    
  2. Connect container to services network:

    . testing/testing.env
    docker network connect $SERVICES_NETWORK_NAME $(hostname)
    
  3. Copy environment configuration:

    cp testing/testing.env ./testing.env
    
  4. Run tests:

    cargo test
    

Dependencies

~51–68MB
~1M SLoC