Files
swift-nio/IntegrationTests/tests_01_http/test_02_get_random_bytes.sh
T
Tom Doron 7d5dc67af8 scripts cleanup
motivation: nicer source tree

chanages:
* move scripts to scripts directory
* move integration tests to IntegrationTests directory and remove driver script
* add .sh extension to bash scripts
* adjust rio.yaml
2018-02-12 10:06:46 -08:00

16 lines
471 B
Bash

#!/bin/bash
source defines.sh
token=$(create_token)
start_server "$token"
htdocs=$(get_htdocs "$token")
base="s/o/m/e/r/a/n/d/o/m/f/o/l/d/e/r"
mkdir -p "$htdocs/$base"
dd if=/dev/urandom of="$htdocs/$base/random.bytes" bs=$((1024 * 1024)) count=2
for method in sendfile fileio; do
do_curl "$token" "http://foobar.com/$method/$base/random.bytes" > "$tmp/random.bytes"
assert_equal_files "$htdocs/$base/random.bytes" "$tmp/random.bytes"
done
stop_server "$token"