integration tests: remove python dependency (#1145)

Motivation:

The integration tests depended on python in order to print 80,000 x
characters.

Modifications:

Remove the python dependency and express the same with `dd` & `tr`.

Result:

Fewer dependencies.
This commit is contained in:
Johannes Weiss 2019-09-24 10:51:39 +01:00 committed by GitHub
parent 43413cefac
commit 7767c4f6af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -28,12 +28,12 @@ $cr
EOF
echo "FOO BAR" > "$htdocs/some_file.txt"
# headers have acceptable size
do_curl "$token" -H "$(python -c 'print "x"*80000'): x" \
do_curl "$token" -H "$(dd if=/dev/zero bs=1000 count=80 2> /dev/null | tr '\0' x): x" \
"http://foobar.com/fileio/some_file.txt" > "$tmp/out"
assert_equal_files "$htdocs/some_file.txt" "$tmp/out"
# headers too large
do_curl "$token" -H "$(python -c 'print "x"*90000'): x" \
do_curl "$token" -H "$(dd if=/dev/zero bs=1000 count=90 2> /dev/null | tr '\0' x): x" \
-D "$tmp/headers_actual" \
"http://foobar.com/fileio/some_file.txt" > "$tmp/out"
assert_equal_files "$tmp/empty" "$tmp/out"