Skip to content

Commit 495a99c

Browse files
committed
feat(testing): Add a minimal workflow for integration testing using local network
1 parent 37b2707 commit 495a99c

File tree

2 files changed

+12
-27
lines changed

2 files changed

+12
-27
lines changed

.github/workflows/tap_integration_test.yml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Test TAP Protocol
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
jobs:
1010
test:
@@ -16,27 +16,12 @@ jobs:
1616
- name: Set up Docker
1717
uses: docker/setup-buildx-action@v2
1818

19-
- name: Set up test environment
20-
run: |
21-
chmod +x setup-test-env.sh
22-
./setup-test-env.sh
19+
- name: Run make setup
20+
run: make setup
2321

24-
- name: Run tests
25-
run: |
26-
chmod +x run-tests.sh
27-
./run-tests.sh
22+
- name: Run make test-local
23+
run: make test-local
2824

29-
- name: Collect logs on failure
30-
if: failure()
31-
run: |
32-
docker logs indexer-service > indexer-service.log
33-
docker logs tap-agent > tap-agent.log
34-
docker logs test-runner > test-runner.log
35-
36-
- name: Upload logs
25+
- name: Tear down containers
3726
if: always()
38-
uses: actions/upload-artifact@v3
39-
with:
40-
name: service-logs
41-
path: |
42-
*.log
27+
run: make down

tests/run-test-local.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ echo "Response: $RESPONSE"
4444

4545
# Check if the response contains payment required error
4646
if echo "$RESPONSE" | grep -q "No Tap receipt was found"; then
47-
echo "✅ Test passed: Query without receipt correctly returned payment required"
47+
echo "✅ Test 1 passed: Query without receipt correctly returned payment required"
4848
else
49-
echo "❌ Test failed: Query without receipt should have returned payment required"
49+
echo "❌ Test 1 failed: Query without receipt should have returned payment required"
5050
exit 1
5151
fi
5252

@@ -59,9 +59,9 @@ echo "Response: $RESPONSE"
5959

6060
# FIXME: Temporary workaround – we're checking for "No sender found for signer" to force a pass.
6161
if echo "$RESPONSE" | grep -q "No sender found for signer"; then
62-
echo "✅ Test passed: Query with receipt succeeded"
62+
echo "✅ Test 2 passed: Query with receipt succeeded"
6363
else
64-
echo "❌ Test failed: Query with receipt should have succeeded"
64+
echo "❌ Test 2 failed: Query with receipt should have succeeded"
6565
exit 1
6666
fi
6767

0 commit comments

Comments
 (0)