From 3af500589668fd20ead2eedd342bd991fe24c757 Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Sat, 21 Feb 2026 02:47:50 -0800 Subject: [PATCH] fix: pass response via env var in record.sh has_api_error (SC2259) (#1559) The heredoc overrode piped stdin, so $response never reached python3. sys.stdin.read() got empty input, making API error detection silently fail during live fixture recording. Pass data via environment variables instead. Agent: test-engineer Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 --- test/record.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/record.sh b/test/record.sh index 73f40584..5416cefc 100644 --- a/test/record.sh +++ b/test/record.sh @@ -317,10 +317,10 @@ has_api_error() { local cloud="$1" local response="$2" - echo "$response" | python3 << VALIDATION_EOF 2>/dev/null -import json, sys -d = json.loads(sys.stdin.read()) -cloud = '$cloud' + _RESPONSE="$response" _CLOUD="$cloud" python3 << 'VALIDATION_EOF' 2>/dev/null +import json, sys, os +d = json.loads(os.environ['_RESPONSE']) +cloud = os.environ['_CLOUD'] # Helper: data keys that indicate success responses (not errors) success_keys = {'servers','images','ssh_keys','flavors','sizes','regions','count','results','id','name','slug','status','ipv4'}