From 7a2af97a2617656f1b54da479b78c2e53549c906 Mon Sep 17 00:00:00 2001 From: Lei Xue Date: Sat, 14 Mar 2026 20:52:58 +0800 Subject: [PATCH] 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) --- .github/workflows/gotgt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gotgt.yml b/.github/workflows/gotgt.yml index 1392e3f..28466f0 100644 --- a/.github/workflows/gotgt.yml +++ b/.github/workflows/gotgt.yml @@ -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