impose test

parent ce1c6a70
...@@ -4,7 +4,7 @@ server s1 { ...@@ -4,7 +4,7 @@ server s1 {
rxreq rxreq
txresp txresp
expect req.method == PUT expect req.method == PUT
expect req.bodylen == 100 expect req.bodylen == 386550
} -start } -start
varnish v1 -vcl+backend { varnish v1 -vcl+backend {
...@@ -15,7 +15,7 @@ varnish v1 -vcl+backend { ...@@ -15,7 +15,7 @@ varnish v1 -vcl+backend {
sub vcl_init { sub vcl_init {
new tmp = tus.server("http://localhost", new tmp = tus.server("http://localhost",
basedir="/tmp/tus", max = 3145B); basedir="/tmp/tus", max = 4MB);
} }
sub vcl_backend_fetch { sub vcl_backend_fetch {
if (bereq.url ~ "^/id") { if (bereq.url ~ "^/id") {
...@@ -50,21 +50,29 @@ client c1 { ...@@ -50,21 +50,29 @@ client c1 {
rxresp rxresp
txreq -method POST \ txreq -method POST \
-hdr "Upload-Length: 100" \ -hdr "Upload-Length: 386550" \
-hdr "Tus-Resumable: 1.0.0" \ -hdr "Tus-Resumable: 1.0.0" \
-hdr "Content-Type: application/offset+octet-stream" \ -hdr "Content-Type: application/offset+octet-stream" \
-hdr "Upload-Checksum: sha256 H98ak0Maj3gjAqfjx2KIqrwAil7CHeKsnJwyzLAXEu8=" \
-hdr "Id: id" \ -hdr "Id: id" \
-bodylen 100 -nolen -hdr "Transfer-Encoding: chunked"
chunkedlen 8192
chunkedlen 4096
chunkedlen 4096
chunkedlen 16384
chunkedlen 16384
chunkedlen 16384
chunkedlen 321014
chunkedlen 0
rxresp rxresp
expect resp.status == 201 expect resp.status == 201
expect resp.http.Tus-Resumable == "1.0.0" expect resp.http.Tus-Resumable == "1.0.0"
expect resp.http.Tus-Version == "1.0.0" expect resp.http.Tus-Version == "1.0.0"
expect resp.http.Tus-Extension == "creation,creation-with-upload,expiration,termination,concatenation,checksum" expect resp.http.Tus-Extension == "creation,creation-with-upload,expiration,termination,concatenation,checksum"
expect resp.http.Tus-Checksum-Algorithm == "crc32,icrc32,md5,rs,sha1,sha224,sha256,sha384,sha3_224,sha3_256,sha3_384,sha3_512,sha512" expect resp.http.Tus-Checksum-Algorithm == "crc32,icrc32,md5,rs,sha1,sha224,sha256,sha384,sha3_224,sha3_256,sha3_384,sha3_512,sha512"
expect resp.http.Tus-Max-Size == 3145 expect resp.http.Tus-Max-Size == 4194304
expect resp.http.Upload-Offset == 100 expect resp.http.Upload-Offset == 386550
expect resp.http.Upload-Length == 100 expect resp.http.Upload-Length == 386550
expect resp.http.Upload-Expires ~ "GMT$" expect resp.http.Upload-Expires ~ "GMT$"
expect resp.http.Location == "http://localhost/id" expect resp.http.Location == "http://localhost/id"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment