Skip to content

Commit

Permalink
This should fix the brotli test
Browse files Browse the repository at this point in the history
  • Loading branch information
BelleNottelling committed Apr 8, 2024
1 parent 7aa47b5 commit 30275ef
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@ jobs:
- name: Test with content encoding
run: |
for encoding in gzip brotli zstd; do
echo "Testing ${encoding}".
output=$(curl localhost:8000 -s -H "Accept-Encoding: ${encoding}" | ${encoding} -d -)
echo "Testing ${encoding}:"
if [ "$encoding" == "brotli" ]; then
output=$(curl localhost:8000 -s -H "Accept-Encoding: br" | brotli -d -)
else
output=$(curl localhost:8000 -s -H "Accept-Encoding: ${encoding}" | ${encoding} -d -)
fi
if [ ! "$output" == "Hello, world!" ]; then
echo "Encoding: ${encoding} did not work correctly."
exit 1
Expand Down

0 comments on commit 30275ef

Please sign in to comment.