hurl/integration/tests_ok/compressed.hurl

144 lines
3.4 KiB
Plaintext
Raw Normal View History

# Uncompressed body tests:
# ---------------------------
# --compressed has no effect on non compressed.
GET http://localhost:8000/compressed/none
2022-11-11 16:25:00 +03:00
HTTP 200
Content-Length: 12
Content-Type: text/html; charset=utf-8
[Asserts]
body startsWith "Hello"
bytes startsWith hex,48656c6c6f;
sha256 == hex,7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069;
md5 == hex,ed076287532e86365e841e92bfc50d8c;
2022-12-02 22:50:27 +03:00
`Hello World!`
# Test base64 implicit body:
GET http://localhost:8000/compressed/none
2022-11-11 16:25:00 +03:00
HTTP 200
base64,SGVsbG8gV29ybGQh;
# Test hex implicit body:
GET http://localhost:8000/compressed/none
2022-11-11 16:25:00 +03:00
HTTP 200
hex,48656c6c6f20576f726c6421;
# Test file implicit body:
GET http://localhost:8000/compressed/none
2022-11-11 16:25:00 +03:00
HTTP 200
file,hello.txt;
# GZip compressed body tests:
# ---------------------------
2020-10-11 22:13:41 +03:00
GET http://localhost:8000/compressed/gzip
2022-11-11 16:25:00 +03:00
HTTP 200
2020-10-11 22:13:41 +03:00
Content-Length: 32
Content-Encoding: gzip
Content-Type: text/html; charset=utf-8
[Asserts]
body startsWith "Hello"
bytes startsWith hex,48656c6c6f;
sha256 == hex,7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069;
md5 == hex,ed076287532e86365e841e92bfc50d8c;
2022-12-02 22:50:27 +03:00
`Hello World!`
2020-10-11 22:13:41 +03:00
# Test base64 implicit body:
GET http://localhost:8000/compressed/gzip
2022-11-11 16:25:00 +03:00
HTTP 200
base64,SGVsbG8gV29ybGQh;
# Test hex implicit body:
GET http://localhost:8000/compressed/gzip
2022-11-11 16:25:00 +03:00
HTTP 200
hex,48656c6c6f20576f726c6421;
# Test file implicit body:
GET http://localhost:8000/compressed/gzip
2022-11-11 16:25:00 +03:00
HTTP 200
file,hello.txt;
# ZLib compressed body tests:
# ---------------------------
GET http://localhost:8000/compressed/zlib
2022-11-11 16:25:00 +03:00
HTTP 200
Content-Length: 20
Content-Encoding: deflate
Content-Type: text/html; charset=utf-8
[Asserts]
body startsWith "Hello"
bytes startsWith hex,48656c6c6f;
sha256 == hex,7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069;
md5 == hex,ed076287532e86365e841e92bfc50d8c;
2022-12-02 22:50:27 +03:00
`Hello World!`
# Test base64 implicit body:
GET http://localhost:8000/compressed/zlib
2022-11-11 16:25:00 +03:00
HTTP 200
base64,SGVsbG8gV29ybGQh;
# Test hex implicit body:
GET http://localhost:8000/compressed/zlib
2022-11-11 16:25:00 +03:00
HTTP 200
hex,48656c6c6f20576f726c6421;
# Test file implicit body:
GET http://localhost:8000/compressed/zlib
2022-11-11 16:25:00 +03:00
HTTP 200
file,hello.txt;
# Brotli compressed body tests:
# ---------------------------
GET http://localhost:8000/compressed/brotli
2022-11-11 16:25:00 +03:00
HTTP 200
2020-10-20 09:18:27 +03:00
Content-Length: 17
Content-Encoding: br
2020-10-11 22:13:41 +03:00
Content-Type: text/html; charset=utf-8
[Asserts]
body startsWith "Hello"
bytes startsWith hex,48656c6c6f;
sha256 == hex,7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069;
md5 == hex,ed076287532e86365e841e92bfc50d8c;
2022-12-02 22:50:27 +03:00
`Hello World!`
2020-10-20 14:51:50 +03:00
# Test base64 implicit body:
GET http://localhost:8000/compressed/brotli
2022-11-11 16:25:00 +03:00
HTTP 200
base64,SGVsbG8gV29ybGQh;
# Test hex implicit body:
GET http://localhost:8000/compressed/brotli
2022-11-11 16:25:00 +03:00
HTTP 200
hex,48656c6c6f20576f726c6421;
# Test file implicit body:
GET http://localhost:8000/compressed/brotli
2022-11-11 16:25:00 +03:00
HTTP 200
file,hello.txt;
2022-05-11 18:13:16 +03:00
# Test a large brotli compressed body:
GET http://localhost:8000/compressed/brotli_large
2022-11-11 16:25:00 +03:00
HTTP 200
2022-05-11 18:13:16 +03:00
Content-Encoding: br
Content-Type: image/jpeg
[Asserts]
bytes startsWith hex,ffd8ffe0; # JPEG magic number
file,cat.jpg;
2020-10-20 14:51:50 +03:00
GET http://localhost:8000/compressed/brotli_identity
2022-11-11 16:25:00 +03:00
HTTP 200
2020-10-20 14:51:50 +03:00
Content-Length: 17
Content-Encoding: br, identity
Content-Type: text/html; charset=utf-8
[Asserts]
body startsWith "Hello"
bytes startsWith hex,48656c6c6f;
sha256 == hex,7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069;
md5 == hex,ed076287532e86365e841e92bfc50d8c;
2022-12-02 22:50:27 +03:00
`Hello World!`