forked from zeroclaw-labs/zeroclaw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick_test.sh
More file actions
executable file
Β·30 lines (23 loc) Β· 986 Bytes
/
quick_test.sh
File metadata and controls
executable file
Β·30 lines (23 loc) Β· 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Quick smoke test for Telegram integration
# Run this before committing code changes
set -e
echo "π₯ Quick Telegram Smoke Test"
echo ""
# Test 1: Compile check
echo -n "1. Compiling... "
cargo build --release --quiet 2>&1 && echo "β" || { echo "β FAILED"; exit 1; }
# Test 2: Unit tests
echo -n "2. Running tests... "
cargo test telegram_split --lib --quiet 2>&1 && echo "β" || { echo "β FAILED"; exit 1; }
# Test 3: Health check
echo -n "3. Health check... "
timeout 7 target/release/zeroclaw channel doctor &>/dev/null && echo "β" || echo "β (configure bot first)"
# Test 4: File checks
echo -n "4. Code structure... "
grep -q "TELEGRAM_MAX_MESSAGE_LENGTH" src/channels/telegram.rs && \
grep -q "split_message_for_telegram" src/channels/telegram.rs && \
grep -q "tokio::time::timeout" src/channels/telegram.rs && \
echo "β" || { echo "β FAILED"; exit 1; }
echo ""
echo "β
Quick tests passed! Run ./test_telegram_integration.sh for full suite."