test(edge): Responses smoke 검증을 보강한다
OpenAI-compatible Ollama E2E smoke가 /v1/responses와 iop-edge smoke openai Step 4까지 확인하도록 해 새 입력 표면의 실제 실행 경로를 검증한다.
This commit is contained in:
parent
80fcbca74f
commit
b2649f988a
1 changed files with 17 additions and 0 deletions
|
|
@ -196,6 +196,14 @@ curl -fsS \
|
|||
grep -q "IOP_OPENAI_OLLAMA_OK" "$CHAT_OUT"
|
||||
grep -q "reasoning_content" "$CHAT_OUT"
|
||||
|
||||
RESPONSES_OUT="$TMP_DIR/responses.json"
|
||||
curl -fsS \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"model":"client-request-model","input":"say the responses test token","stream":false,"metadata":{"request_id":"e2e-openai-ollama","inference":{"target":"fake-ollama-model"},"nomadcode":{"task_id":"task-smoke","source":"manual"}}}' \
|
||||
"http://127.0.0.1:$OPENAI_PORT/v1/responses" > "$RESPONSES_OUT"
|
||||
grep -q "IOP_OPENAI_OLLAMA_OK" "$RESPONSES_OUT"
|
||||
grep -q '"output_text"' "$RESPONSES_OUT"
|
||||
|
||||
STREAM_OUT="$TMP_DIR/stream.txt"
|
||||
curl -fsS -N \
|
||||
-H "Content-Type: application/json" \
|
||||
|
|
@ -205,6 +213,15 @@ grep -q '"reasoning_content":"thinking..."' "$STREAM_OUT"
|
|||
grep -q '"content":"IOP_OPENAI_"' "$STREAM_OUT"
|
||||
grep -q 'data: \[DONE\]' "$STREAM_OUT"
|
||||
|
||||
SMOKE_OUT="$TMP_DIR/iop-edge-smoke-openai.txt"
|
||||
(cd "$REPO_ROOT" && go run ./apps/edge/cmd/edge smoke openai \
|
||||
--model "$MODEL" \
|
||||
--base-url "http://127.0.0.1:$OPENAI_PORT" \
|
||||
--prompt "say the command smoke token" \
|
||||
--timeout 20s) > "$SMOKE_OUT"
|
||||
grep -q "Step 4: Checking /v1/responses ... \[OK\]" "$SMOKE_OUT"
|
||||
grep -q "IOP Edge OpenAI Smoke Test SUCCESS!" "$SMOKE_OUT"
|
||||
|
||||
if grep -i -E "node reported error|error run_id=|\[[^]]+-evt\] error|panic:" "$EDGE_OUT" "$NODE_OUT" >/dev/null; then
|
||||
echo "[openai-ollama] detected failure marker"
|
||||
echo "=== EDGE OUTPUT ==="; cat "$EDGE_OUT"
|
||||
|
|
|
|||
Loading…
Reference in a new issue