cd /opt/data/workspace
{
  echo "GOOD_127: $(curl -s -o /dev/null -w '%{http_code}' -H "Authorization: Bearer $HERMES_BRIDGE_TOKEN" http://127.0.0.1:8770/agents/x/env)"
  echo "BAD_127:  $(curl -s -o /dev/null -w '%{http_code}' -H "Authorization: Bearer wrong123" http://127.0.0.1:8770/agents/x/env)"
  echo "NOAUTH_127:$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:8770/agents/x/env)"
  echo "GOOD_CIP: $(curl -s -o /dev/null -w '%{http_code}' -H "Authorization: Bearer $HERMES_BRIDGE_TOKEN" http://10.222.205.28:8770/agents/x/env)"
  echo "GOOD_ROOT:$(curl -s -o /dev/null -w '%{http_code}' -H "Authorization: Bearer $HERMES_BRIDGE_TOKEN" http://127.0.0.1:8770/agents)"
  echo "----- GOOD body -----"
  curl -s -H "Authorization: Bearer $HERMES_BRIDGE_TOKEN" http://127.0.0.1:8770/agents/x/env | head -c 300
  echo
  echo "----- verify token hash -----"
  printf '%s' "$HERMES_BRIDGE_TOKEN" | sha256sum
} > tok_test.txt 2>&1
echo DONE >> tok_test.txt
