Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tests reporting properly #138

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading