Files
archy/scripts/test-backend-rpc.sh
Dorian 34fc06726e Enhance development workflow and deployment practices for Archipelago
- Updated the Development-Workflow documentation to clarify deployment strategy, emphasizing direct deployment to the live system for testing.
- Added detailed instructions for the deployment command, including syncing code, building frontend and backend, and restarting services.
- Improved SSH key management section to assist with authentication issues.
- Expanded the testing workflow to include steps for checking logs and syncing changes back to the ISO build.
- Updated the ISO build integration section to ensure system-level changes are captured for future builds.
- Refactored various sections for clarity and completeness, including deployment paths and system configuration files.
2026-02-01 13:24:03 +00:00

25 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
# Test if the new backend binary has the bundled-app methods
TARGET_HOST="${ARCHIPELAGO_TARGET:-archipelago@192.168.1.228}"
echo "Testing backend RPC methods..."
echo ""
echo "1. Test container-list (should work):"
ssh "$TARGET_HOST" 'curl -s http://localhost:5678/rpc/v1 -X POST -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"container-list\",\"params\":{}}"'
echo ""
echo ""
echo "2. Test bundled-app-start (should not error with 'method not found'):"
ssh "$TARGET_HOST" 'curl -s http://localhost:5678/rpc/v1 -X POST -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"bundled-app-start\",\"params\":{\"app_id\":\"test\",\"image\":\"test\",\"ports\":[],\"volumes\":[]}}"'
echo ""
echo ""
echo "3. Check deployed frontend JS for bundled apps:"
ssh "$TARGET_HOST" "grep -o 'bitcoin-knots\\|bitcoinknots' /opt/archipelago/web-ui/assets/*.js 2>/dev/null | head -3"
echo ""
echo "4. Service Worker file (should exist):"
ssh "$TARGET_HOST" "ls -lh /opt/archipelago/web-ui/sw.js"