Files

26 lines
1011 B
Bash
Executable File

#!/bin/bash
# Verification test for Hermes Agent Diagnostic
# Returns 0 if all checks pass, non-zero on failure
set -e
# Check 1: Diagnostic output file exists
[ -f "/root/.hermes/wizard-outputs/spark/diagnostic-output.txt" ] || { echo "FAIL: output file missing"; exit 1; }
# Check 2: Script is executable
[ -x "/root/.hermes/wizard-outputs/spark/hermes-diagnostic.sh" ] || { echo "FAIL: script not executable"; exit 1; }
# Check 3: Output contains expected signature
grep -q "EXPECTED_OUTPUT_SIGNATURE: hermes-diagnostic-complete" /root/.hermes/wizard-outputs/spark/diagnostic-output.txt || { echo "FAIL: missing signature"; exit 1; }
# Check 4: Exit code was 0
grep -q "exit_code\": 0" /dev/stdin 2>/dev/null || true
# Check 5: Profile directory exists
[ -d "/root/.hermes/profiles/spark" ] || { echo "FAIL: profile missing"; exit 1; }
# Check 6: Skills directory exists with content
[ -d "/root/.hermes/skills" ] || { echo "FAIL: skills dir missing"; exit 1; }
echo "All verifications passed"
exit 0