fix(glpi): accept partial content in list wrappers
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful

Accept HTTP 206 responses from ranged GLPI list endpoints while preserving failures for genuine error statuses. Add red-first regression coverage across ticket, computer, and user lists.

Closes #807

Co-Authored-By: OpenAI GPT <noreply@openai.com>
This commit is contained in:
2026-07-16 17:31:30 -05:00
parent 3be443c96d
commit e1d3891bd1
5 changed files with 151 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ response=$(curl -sk -w "\n%{http_code}" \
http_code=$(echo "$response" | tail -n1)
body=$(echo "$response" | sed '$d')
if [[ "$http_code" != "200" ]]; then
if [[ "$http_code" != "200" && "$http_code" != "206" ]]; then
echo "Error: Failed to list computers (HTTP $http_code)" >&2
exit 1
fi