Updates circle-ci with basic e2e infraestructure

This commit is contained in:
Sergi Delgado Segura
2020-01-20 10:48:11 +01:00
parent f91475c61b
commit 2c8c8c7323
3 changed files with 62 additions and 6 deletions

View File

@@ -32,7 +32,8 @@ jobs:
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r pisa/requirements.txt
sudo pip install --upgrade pip
pip install -r pisa/requirements.txt
pip install -r pisa/requirements-dev.txt
pip install -r apps/cli/requirements-dev.txt
@@ -41,11 +42,20 @@ jobs:
- ./venv
key: v1-dependencies-{{ checksum "pisa/requirements.txt" }}-{{ checksum "pisa/requirements-dev.txt" }}-{{ checksum "apps/cli/requirements-dev.txt" }}
# run tests!
# this example uses Django's built-in test-runner
# other common Python testing frameworks include pytest and nose
# https://pytest.org
# https://nose.readthedocs.io
# Build docker env for E2E testing
- run:
name: build bitcoin_sandbox
command: |
git clone --single-branch --branch ln https://github.com/sr-gi/bitcoin_sandbox.git
. venv/bin/activate
pip install -r bitcoin_sandbox/requirements.txt
cp test/pisa/e2e/bitcoin.conf bitcoin_sandbox/
cp test/pisa/e2e/conf.py bitcoin_sandbox/bitcoin_sandbox/
mv bitcoin_sandbox/bitcoin_sandbox venv/lib/python3.6/site-packages
python venv/lib/python3.6/site-packages/bitcoin_sandbox/run_scenarios.py
# Run unit tests
- run:
name: create config
command: cp pisa/sample_conf.py pisa/conf.py

View File

@@ -0,0 +1,27 @@
# [network]
dnsseed=0
# [debug]
regtest=1
debug=1
logips=1
# [rpc]
server=1
rpcuser=user
rpcpassword=passwd
rpcallowip=0.0.0.0/0
rpcservertimeout=300
# [zmq]
zmqpubhashblock=tcp://0.0.0.0:28332
zmqpubrawblock=tcp://0.0.0.0:28332
zmqpubrawtx=tcp://0.0.0.0:28333
# [blockchain]
txindex=1
# There are some parameters that only work in the specific on regtest if specified in the regtest section
[regtest]
rpcbind=0.0.0.0
rpcport=18443

19
test/pisa/e2e/conf.py Normal file
View File

@@ -0,0 +1,19 @@
# Copy this file with your own configuration and save it as conf.py
# Docker
DOCK_NETWORK_NAME = "pisa_net"
DOCK_NETWORK_SUBNET = "172.16.0.0/16"
DOCK_NETWORK_GW = "172.16.0.1"
DOCK_CONTAINER_NAME_PREFIX = "btc_n"
DOCK_IMAGE_NAME = "sandbox_btc"
DOCKER_INI_PORT_MAPPING = 22000
DOCKER_RPC_PORT_MAPPING = 18444
DOCKER_ZMQ_BLOCK_PORT_MAPPING = 28334
# Log
LOG_FILE = "bitcoin_sandbox.log"
# Graphs
BITCOIN_GRAPH_FILE = "./graphs/basic3.graphml"
LN_GRAPH_FILE = "./graphs/basic3_ln.graphml"
DEFAULT_LN_GRAPH_WEIGHT = 10000