Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
1.9 kB ยท 65 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566#!/usr/bin/env fish# Test Chat Integration, 25.11.28# CLI test script for chat functionality
set HOST localhost:8889
echo "๐งช Chat Integration Tests"echo "========================="echo ""
# Test 1: HTTP health check (main session server)echo "๐ Test 1: Session Server Health"set response (curl -sk https://$HOST/ 2>&1)if string match -q "*session-server*" $response echo " โ
Session server responding"else echo " โ ๏ธ Response: $response"endecho ""
# Test 2: Chat status endpointecho "๐ Test 2: Chat Status Endpoint"set response (curl -sk https://$HOST/chat/status 2>&1)if string match -q "*chat-system*" $response echo " โ
Chat status endpoint working" echo " ๐ $response"else echo " โ ๏ธ Response: $response"endecho ""
# Test 3: WebSocket connection (requires websocat or similar)echo "๐ Test 3: WebSocket Connection"if command -v websocat > /dev/null set ws_response (echo '{"type":"ping"}' | timeout 2 websocat -1 --insecure wss://$HOST/ 2>&1) if test $status -eq 0 echo " โ
WebSocket connection successful" else echo " โ ๏ธ WebSocket test requires chat host header" endelse echo " โญ๏ธ Skipped (websocat not installed)"endecho ""
# Test 4: Log endpoint (requires auth)echo "๐ Test 4: Log Endpoint (Auth Required)"set response (curl -sk -X POST https://$HOST/chat/log \ -H "Authorization: Bearer invalid" \ -H "Content-Type: application/json" \ -d '{"text":"Test message"}' 2>&1)if string match -q "*Forbidden*" $response echo " โ
Auth check working (correctly rejected invalid token)"else echo " โ ๏ธ Response: $response"endecho ""
echo "========================="echo "๐ Tests complete!"echo ""echo "For full WebSocket testing, connect to:"echo " wss://chat-system.aesthetic.computer"echo " wss://chat-clock.aesthetic.computer"echo " wss://chat.sotce.net"