2022-05-21 08:24:49 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
url="https://raw.githubusercontent.com/orhun/rustypaste/master/img/rustypaste_logo.png"
|
|
|
|
|
|
|
|
setup() {
|
|
|
|
:;
|
|
|
|
}
|
|
|
|
|
2022-05-21 09:43:32 -04:00
|
|
|
run_test() ( set -e;
|
2022-05-21 08:24:49 -04:00
|
|
|
file_url=$(curl -s -F "remote=$url" localhost:8000)
|
|
|
|
curl -s "$file_url" -o uploaded_file > /dev/null
|
|
|
|
curl -s "$url" -o remote_file > /dev/null
|
|
|
|
test "$(sha256sum uploaded_file | awk '{print $1}')" = "$(sha256sum remote_file | awk '{print $1}')"
|
2022-05-21 09:43:32 -04:00
|
|
|
)
|
2022-05-21 08:24:49 -04:00
|
|
|
|
|
|
|
teardown() {
|
|
|
|
rm uploaded_file remote_file
|
|
|
|
rm -r upload
|
|
|
|
}
|