Skip to content

Commit

Permalink
Feat/tests for atomic swap (#72)
Browse files Browse the repository at this point in the history
* feat: add tests for atomic swap

* fix: assertion for coin lock error

* fix: test for atomic swap with timeout

* feat: add test for stealing coin

* fix: assert errors

* fix: typo error

* fix: assertion in swap timeout test

* fix: batch lock assertion

* fix: assert values for batch lock

* fix: batch timeout expired assertion

* debug: transferReceive with batch true

* debug: atomic swap

* Add lightning latch functions to nodeJS client

* debug: batch timeout

* fix: increase sleep for batch timeout expiry

* fix: batch timeout expiry assertion

* chore: refactor atomic swap tests

* fix: export error

* fix: import errors

* fix: sqlite import error

---------

Co-authored-by: S. Santos <[email protected]>
  • Loading branch information
DhananjayPurohit and ssantos21 authored Jul 18, 2024
1 parent 1220b55 commit d2fb048
Show file tree
Hide file tree
Showing 8 changed files with 987 additions and 94 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,7 @@ jobs:
echo "Container ID: $container_id"
docker logs $container_id
docker exec $container_id \
curl -X POST http://0.0.0.0:8000/deposit/init/pod \
-H "Content-Type: application/json" \
-d '{
"auth_key": "f461775606ffc86e3f6e3115ff425d371b0f68cc59ad8cf71375c0e08c2ee8e9",
"token_id": "616f505d-b94c-45cf-b251-833e4fa14fa1",
"signed_token_id": "7401ac1f792f56d5357997f9846b5045656758f4afece4c51b73472bd338e97da3d167733502cf62d77c1169bd89bfaa0c9c5fcc26d75190e7a3a3fd2f83ae0a"
}'
curl http://0.0.0.0:8000/info/config
- name: Get Public Key
run: |
docker exec $(docker ps -qf "name=enclave") \
Expand Down Expand Up @@ -112,6 +106,7 @@ jobs:
run: |
cd clients/apps/nodejs
node test_basic_workflow2.js
node test_atomic_swap.js
- name: Tear Down
run: |
docker-compose -f docker-compose-test.yml down
Loading

0 comments on commit d2fb048

Please sign in to comment.