Skip to content

Commit

Permalink
Merge pull request #138 from Alzymologist/vovke/paipeline-fix
Browse files Browse the repository at this point in the history
fix: tests reporting properly
  • Loading branch information
Slesarew authored Nov 21, 2024
2 parents 45dad7a + 93caca5 commit 602c38a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/kalatori-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,18 @@ jobs:
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
- name: Build and Start Containers
- name: Build Containers
working-directory: ./tests
run: |
docker-compose up -d --build chopsticks-polkadot chopsticks-statemint kalatori-rust-app
docker-compose build
- name: Wait for Dependencies to Initialize
run: sleep 60
- name: Run Tests
working-directory: ./tests
run: |
docker-compose up --exit-code-from tests --abort-on-container-exit tests
- name: Run Tests and Capture Exit Code
- name: Tear Down Containers
working-directory: ./tests
if: always()
run: |
docker-compose run tests || exit_code=$?
docker-compose down
exit ${exit_code:-0}
2 changes: 1 addition & 1 deletion tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ services:
- kalatori-rust-app
environment:
- DAEMON_HOST=http://kalatori-daemon:16726
command: /bin/sh -c "sleep 50 && yarn install && yarn test"
command: /bin/sh -c "sleep 180 && yarn install && yarn test"
2 changes: 1 addition & 1 deletion tests/kalatori-api-test-suite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "jest"
"test": "jest --silent"
},
"keywords": [],
"author": "",
Expand Down
2 changes: 2 additions & 0 deletions tests/kalatori-api-test-suite/tests/order.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ describe('Order Endpoint Blackbox Tests', () => {
halfAmount,
orderDetails.currency.asset_id
);

// lets wait for the changes to get propagated on chain and app to catch them
await new Promise(resolve => setTimeout(resolve, 15000));

Expand Down Expand Up @@ -310,6 +311,7 @@ describe('Order Endpoint Blackbox Tests', () => {
halfAmount,
orderDetails.currency.asset_id
);

// lets wait for the changes to get propagated on chain and app to catch them
await new Promise(resolve => setTimeout(resolve, 15000));

Expand Down

0 comments on commit 602c38a

Please sign in to comment.