#!/bin/bash # Script de test final pour sdk_relay set -e echo "🔍 Test final de sdk_relay..." echo "" # Test 1: VĂ©rifier que tous les services sont prĂȘts echo "📡 Test 1: Services prĂȘts" if sudo docker-compose ps | grep -q "bitcoin-signet.*Up"; then echo "✅ Bitcoin Core en cours d'exĂ©cution" else echo "❌ Bitcoin Core non dĂ©marrĂ©" exit 1 fi if sudo docker-compose ps | grep -q "blindbit-oracle.*Up"; then echo "✅ Blindbit en cours d'exĂ©cution" else echo "❌ Blindbit non dĂ©marrĂ©" exit 1 fi # Test 2: VĂ©rifier la rĂ©solution DNS depuis sdk_relay echo "" echo "📡 Test 2: RĂ©solution DNS depuis sdk_relay" if sudo docker run --rm --network 4nk_node_btcnet lecoffre_node_sdk_relay getent hosts bitcoin 2>/dev/null | grep -q "bitcoin"; then echo "✅ RĂ©solution DNS 'bitcoin' OK" else echo "❌ RĂ©solution DNS 'bitcoin' Ă©choue" exit 1 fi if sudo docker run --rm --network 4nk_node_btcnet lecoffre_node_sdk_relay getent hosts blindbit 2>/dev/null | grep -q "blindbit"; then echo "✅ RĂ©solution DNS 'blindbit' OK" else echo "❌ RĂ©solution DNS 'blindbit' Ă©choue" exit 1 fi # Test 3: VĂ©rifier la connectivitĂ© depuis sdk_relay echo "" echo "📡 Test 3: ConnectivitĂ© depuis sdk_relay" if sudo docker run --rm --network 4nk_node_btcnet lecoffre_node_sdk_relay sh -c "curl -s -f http://bitcoin:18443 >/dev/null" 2>/dev/null; then echo "✅ Bitcoin Core accessible depuis sdk_relay" else echo "❌ Bitcoin Core inaccessible depuis sdk_relay" exit 1 fi if sudo docker run --rm --network 4nk_node_btcnet lecoffre_node_sdk_relay sh -c "curl -s -f http://blindbit:8000 >/dev/null" 2>/dev/null; then echo "✅ Blindbit accessible depuis sdk_relay" else echo "❌ Blindbit inaccessible depuis sdk_relay" exit 1 fi # Test 4: VĂ©rifier la configuration dans le container sdk_relay echo "" echo "📡 Test 4: Configuration dans sdk_relay" echo "Configuration .conf.docker:" sudo docker run --rm --network 4nk_node_btcnet lecoffre_node_sdk_relay cat /home/bitcoin/.conf.docker 2>/dev/null || echo "❌ Impossible de lire .conf.docker" echo "" echo "🎯 Tous les tests sont passĂ©s ! sdk_relay peut maintenant dĂ©marrer." echo "" echo "💡 Pour dĂ©marrer sdk_relay:" echo " sudo docker-compose up -d sdk_relay"