| Crates.io | switchgear-testing |
| lib.rs | switchgear-testing |
| version | 0.1.26 |
| created_at | 2025-10-11 20:26:04.438683+00 |
| updated_at | 2025-12-09 03:45:25.627771+00 |
| description | CI Integration Testing Framework for Switchgear |
| homepage | https://bitshock.com |
| repository | https://github.com/bitshock-src/switchgear |
| max_upload_size | |
| id | 1878523 |
| size | 99,030 |
Docker-based regtest environment for testing with Lightning Network nodes (CLN, LND), Bitcoin Core, and databases.
Start services:
cd testing
docker compose --env-file ./testing.env up -d --build --wait
Copy environment configuration:
cp testing/testing.env ./testing.env
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
cargo test
For running tests inside a container with Docker socket access.
Start services:
cd testing
docker compose --env-file ./testing.env up -d --build --wait
Connect container to services network:
. testing/testing.env
docker network connect $SERVICES_NETWORK_NAME $(hostname)
Copy environment configuration:
cp testing/testing.env ./testing.env
Run tests:
cargo test