mirror of
https://github.com/amigan/rustypaste-pretty.git
synced 2024-11-22 04:19:47 -05:00
19 lines
457 B
Bash
Executable file
19 lines
457 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
url="https://raw.githubusercontent.com/orhun/rustypaste/master/img/rustypaste_logo.png"
|
|
|
|
setup() {
|
|
:;
|
|
}
|
|
|
|
run_test() {
|
|
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}')"
|
|
}
|
|
|
|
teardown() {
|
|
rm uploaded_file remote_file
|
|
rm -r upload
|
|
}
|