diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e016042..eeb2daf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -86,6 +86,16 @@ jobs: exit 1 fi + - name: HEAD a file + run: | + curl -sI http://localhost:4221/files/pineapple_grape_grape_pineapple \ + --output response.raw + printf "HTTP/1.1 200 OK\r\nContent-Type: application/octet-stream\r\nContent-Length: 69\r\n\r\n" > expected.raw + if ! diff response.raw expected.raw; then + echo "Test failed!" + exit 1 + fi + - name: gzip test 1/2 run: | curl --output response0.raw -si -H "Accept-Encoding: gzip" http://localhost:4221/echo/abc @@ -109,15 +119,6 @@ jobs: exit 1 fi - - name: HEAD a file - run: | - response=$(curl --output response.raw -si -X HEAD http://localhost:4221/files/pineapple_grape_grape_pineapple) - printf "HTTP/1.1 200 OK\r\nContent-Type: application/octet-stream\r\nContent-Length: 69\r\n\r\n" > expected.raw - if ! diff response.raw expected.raw; then - echo "Test failed!" - exit 1 - fi - - name: Test concurrent connections run: | seq 1 10 | xargs -n1 -P10 curl -s -o /dev/null -w "%{http_code} %{time_total}\n" http://localhost:4221/ \ No newline at end of file