E2E Testing Session - 2025-12-19

Summary

E2E testing of the ICN stack on K3s cluster (10.8.10.40).

Infrastructure Status

Component Status Access
icn-daemon Running (1/1) -
Gateway API Working http://10.8.10.40:30080
Pilot UI Running (1/1) http://10.8.10.40:30030
Metrics Available http://10.8.10.40:30091

Fixes Applied This Session

  1. Pilot UI Docker Image - Built and synced to all K3s nodes

    cd deploy/k8s
    make build-ui-image
    make sync-ui-image
    make restart-ui
    
  2. Test Cooperative Created - "test-coop" for API testing

API Testing Results

Working Endpoints

Endpoint Method Status Notes
/v1/health GET 200 Returns {"status":"ok","version":"0.1.0"}
/v1/coops POST 201 Creates new cooperative
/v1/coops/{id} GET 200 Returns coop details with members
/v1/ledger/{coop}/balance/{did} GET 200 Returns balance info

Not Working (404)

Endpoint Method Expected Issue
/v1/coops GET List all coops Route not found
/v1/gov/proposals GET List proposals Route not found
/v1/gov/domains GET List domains Route not found
/v1/ledger/{coop}/{did}/history GET Transaction history Route not found

Root Cause: Deployed version is icn:qr-fix2 which may not have all routes properly wired.

How to Access the Demo

1. Get an Auth Token

ssh ubuntu@10.8.10.40 "sudo kubectl -n icn exec deployment/icn-daemon -- /usr/local/bin/icnctl auth token --coop-id test-coop --scopes ledger:read,ledger:write,coop:read,coop:write,gov:read,gov:write"

2. Test API with Token

TOKEN="<paste-token-here>"

# Health check
curl http://10.8.10.40:30080/v1/health

# Get coop details
curl -H "Authorization: Bearer $TOKEN" http://10.8.10.40:30080/v1/coops/test-coop

# Get balance
curl -H "Authorization: Bearer $TOKEN" "http://10.8.10.40:30080/v1/ledger/test-coop/balance/did:icn:z9AWguvsTEkAVXkpQrHWthPuK86Tw3c8DunToVWLJeP4s"

3. Access Pilot UI

  1. Open browser: http://10.8.10.40:30030
  2. Enter Gateway URL: http://10.8.10.40:30080
  3. Enter Cooperative ID: test-coop
  4. Use icnctl to generate a token and paste it

Current Test Coop Info

Field Value
Coop ID test-coop
Name Test Cooperative
DID did:icn:z9AWguvsTEkAVXkpQrHWthPuK86Tw3c8DunToVWLJeP4s
Node k3s-control (10.8.10.40)

Recommendations

  1. Deploy Latest Code: Run make full-deploy-dev to update to latest code with all routes
  2. Add List Routes: Verify /v1/coops GET route is properly registered
  3. Test Full Flow: After deployment update, re-test all endpoints

Commands Reference

# Check deployment status
make status

# View daemon logs
make logs

# Check UI status
make ui-status

# Redeploy everything
make full-deploy-dev