fix(ci): Fix SDK inception tests - run file directly, not as inline code

This commit is contained in:
russell@unturf.com 2026-01-17 16:28:24 -05:00
parent 2e11e1bac4
commit 499e138ea5

View file

@ -379,15 +379,16 @@ echo ""
# ============================================================================
echo "--- SDK Inception ($LANG) ---"
# Test 8.1: SDK loads in sandbox
run_test "sdk_loads" \
"build/un -n semitrusted -e UNSANDBOX_PUBLIC_KEY=\$UNSANDBOX_PUBLIC_KEY -e UNSANDBOX_SECRET_KEY=\$UNSANDBOX_SECRET_KEY -s '$LANG' '$SDK_FILE'" \
"usage|help|unsandbox|un |version"
# Test 8.1: SDK file exists and is readable
run_test "sdk_exists" \
"test -f '$SDK_FILE' && wc -l < '$SDK_FILE'" \
"[0-9]+"
# Test 8.2: SDK with test file
run_test "sdk_with_file" \
"build/un -n semitrusted -e UNSANDBOX_PUBLIC_KEY=\$UNSANDBOX_PUBLIC_KEY -e UNSANDBOX_SECRET_KEY=\$UNSANDBOX_SECRET_KEY -s '$LANG' -f test/fib.py '$SDK_FILE'" \
"usage|help|fib|[0-9]+"
# Test 8.2: Run SDK file directly (auto-detect language from extension)
# Note: This sends the file to the API, not inline code
run_test "sdk_runs" \
"build/un -n semitrusted -e UNSANDBOX_PUBLIC_KEY=\$UNSANDBOX_PUBLIC_KEY -e UNSANDBOX_SECRET_KEY=\$UNSANDBOX_SECRET_KEY '$SDK_FILE'" \
"usage|help|unsandbox|un |version|error|Usage"
echo ""