diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b9b82a765..6d25b059e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,8 +11,23 @@ jobs: run: pwd - name: List files run: ls -la - - name: Copy lnd files + - name: Copy alice cert file run: docker cp polar-n2-alice:/home/lnd/.lnd/tls.cert alice-tls.cert - - name: check copied file - run : cat alice-tls.cert - \ No newline at end of file + - name: Copy bob cert file + run: docker cp polar-n2-bob:/home/lnd/.lnd/tls.cert bob-tls.cert + - name: Copy carol cert file + run: docker cp polar-n2-carol:/home/lnd/.lnd/tls.cert carol-tls.cert + - name: Copy dave cert file + run: docker cp polar-n2-dave:/home/lnd/.lnd/tls.cert dave-tls.cert + - name: Copy alice macaroon file + run: docker cp polar-n2-dave:/home/lnd/.lnd/data/chain/bitcoin/regtest/admin.macaroon alice-admin.macaroon + - name: Copy bob macaroon file + run: docker cp polar-n2-bob:/home/lnd/.lnd/data/chain/bitcoin/regtest/admin.macaroon bob-admin.macaroon + - name: Copy carol macaroon file + run: docker cp polar-n2-carol:/home/lnd/.lnd/data/chain/bitcoin/regtest/admin.macaroon carol-admin.macaroon + - name: Copy dave macaroon file + run: docker cp polar-n2-dave:/home/lnd/.lnd/data/chain/bitcoin/regtest/admin.macaroon dave-admin.macaroon + - name: copy env file + run: cp src/tests/.env.test .env + - name: Run tests + run: npm test \ No newline at end of file diff --git a/src/tests/.env.test b/src/tests/.env.test new file mode 100644 index 000000000..0e610e5fe --- /dev/null +++ b/src/tests/.env.test @@ -0,0 +1,33 @@ +LND_ADDRESS=127.0.0.1:10001 +LND_CERT_PATH=alice-tls.cert +LND_MACAROON_PATH=alice-admin.macaroon +DATABASE_FILE=db.sqlite +JWT_SECRET=bigsecrethere +ALLOW_BALANCE_MIGRATION=true +OUTBOUND_MAX_FEE_BPS=60 +OUTBOUND_MAX_FEE_EXTRA_SATS=100 +INCOMING_CHAIN_FEE_ROOT_BPS=0 +OUTGOING_CHAIN_FEE_ROOT_BPS=60 #this is applied only to withdrawls from application wallets +INCOMING_INVOICE_FEE_ROOT_BPS=0 +OUTGOING_INVOICE_FEE_ROOT_BPS=60 #this is applied only to withdrawals from application wallets +INCOMING_INVOICE_FEE_USER_BPS=0 #defined by app this is just default +OUTGOING_INVOICE_FEE_USER_BPS=60 #defined by app this is just default +TX_FEE_INTERNAL_ROOT_BPS=60 #this is applied only to withdrawls from application wallets +TX_FEE_INTERNAL_USER_BPS=60 #defined by app this is just default +NOSTR_RELAYS=wss://strfry.shock.network +SERVICE_URL=http://localhost:8080 +ADMIN_TOKEN=thisisadmin +PORT=8080 +METRICS_DATABASE_FILE=metrics.sqlite +WATCHDOG_MAX_DIFF_BPS=100 +WATCHDOG_MAX_DIFF_SATS=10000 + + +LND_OTHER_ADDR=127.0.0.1:10002 +LND_OTHER_CERT_PATH=bob-tls.cert +LND_OTHER_MACAROON_PATH=bob-admin.macaroon + +LND_THIRD_ADDR=127.0.0.1:10004 +LND_THIRD_CERT_PATH=dave-tls.cert +LND_THIRD_MACAROON_PATH=dave-admin.macaroon +