ci: handle null response when LU list is empty after deletion
Go's json.Encode outputs null for nil slices. Handle both null and empty array in the LU removal verification. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2
.github/workflows/gotgt.yml
vendored
2
.github/workflows/gotgt.yml
vendored
@@ -224,7 +224,7 @@ jobs:
|
||||
echo "--- verify lu removed ---"
|
||||
curl -sf "$API/lu/list?target=$NEW_TARGET" | tee /tmp/list_lu3.out
|
||||
echo ""
|
||||
python3 -c "import json,sys; data=json.load(sys.stdin); assert len(data)==0, f'expected 0 LUs, got {len(data)}'" < /tmp/list_lu3.out
|
||||
python3 -c "import json,sys; data=json.load(sys.stdin); assert data is None or len(data)==0, f'expected 0 LUs, got {data}'" < /tmp/list_lu3.out
|
||||
echo "PASS: LU no longer in list"
|
||||
|
||||
# 10. Remove the target
|
||||
|
||||
Reference in New Issue
Block a user