test_backend.sh
1 #!/bin/bash 2 # Simple test of backend connectivity 3 4 echo "๐งช Testing backend integration..." 5 echo "" 6 7 # Test 1: Check kamaji is available 8 echo "Test 1: Checking kamaji command..." 9 if command -v kamaji &> /dev/null; then 10 echo "โ kamaji found: $(which kamaji)" 11 echo " Version: $(kamaji --version)" 12 else 13 echo "โ kamaji not found in PATH" 14 exit 1 15 fi 16 17 # Test 2: Check Go binary exists 18 echo "" 19 echo "Test 2: Checking Go binary..." 20 if [ -x ./kamaji-tui ]; then 21 echo "โ Binary exists" 22 echo " Size: $(ls -lh kamaji-tui | awk '{print $5}')" 23 else 24 echo "โ Binary not found or not executable" 25 exit 1 26 fi 27 28 # Test 3: Verify imports compile 29 echo "" 30 echo "Test 3: Verifying code compiles..." 31 if go build . 2>/dev/null; then 32 echo "โ Compiles successfully" 33 else 34 echo "โ Compilation failed" 35 exit 1 36 fi 37 38 echo "" 39 echo "๐ Code stats:" 40 wc -l *.go | tail -1 41 42 echo "" 43 echo "โ All backend tests passed!" 44 echo "" 45 echo "Ready to test interactively. Run: ./kamaji-tui"