diff --git a/tests/sod/image_resize/test/.gitignore b/tests/sod/image_resize/test/.gitignore index aaf36ac..dd6ff92 100644 --- a/tests/sod/image_resize/test/.gitignore +++ b/tests/sod/image_resize/test/.gitignore @@ -1 +1,2 @@ res/* +result.jpg diff --git a/tests/sod/image_resize/test/Makefile b/tests/sod/image_resize/test/Makefile index ad572f9..2c29670 100644 --- a/tests/sod/image_resize/test/Makefile +++ b/tests/sod/image_resize/test/Makefile @@ -18,4 +18,4 @@ debug: --eval-command="run spec.json" client: - curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@flower.jpg" --output "result.jpg" "${HOSTNAME}:10000" + curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@flower.jpg" --output "result.jpg" "${HOSTNAME}:10000/resize" diff --git a/tests/sod/image_resize/test/run.sh b/tests/sod/image_resize/test/run.sh index cdedbcf..c65fcd1 100755 --- a/tests/sod/image_resize/test/run.sh +++ b/tests/sod/image_resize/test/run.sh @@ -28,7 +28,7 @@ experiment_client() { for ((i = 0; i < total_count; i++)); do ext="$RANDOM" - if curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@flower.jpg" --output "$tmpfs_dir/result_$ext.jpg" "$hostname:10000" 2> /dev/null 1> /dev/null; then + if curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@flower.jpg" --output "$tmpfs_dir/result_$ext.jpg" "$hostname:10000/resize" 2> /dev/null 1> /dev/null; then pixel_differences="$(compare -identify -metric AE "$tmpfs_dir/result_$ext.jpg" expected_result.jpg null: 2>&1 > /dev/null)" diff --git a/tests/sod/image_resize/test/spec.json b/tests/sod/image_resize/test/spec.json index 09881ff..456c911 100644 --- a/tests/sod/image_resize/test/spec.json +++ b/tests/sod/image_resize/test/spec.json @@ -1,12 +1,16 @@ [ { - "name": "resize", - "path": "resize_image.wasm.so", + "name": "gwu", "port": 10000, - "expected-execution-us": 5000, - "relative-deadline-us": 50000, - "http-req-size": 1024000, - "http-resp-size": 1024000, - "http-resp-content-type": "image/png" + "routes": [ + { + "route": "/resize", + "path": "resize_image.wasm.so", + "expected-execution-us": 5000, + "relative-deadline-us": 50000, + "http-resp-size": 1024000, + "http-resp-content-type": "image/jpeg" + } + ] } ]