fix(fixtures): enable random URLs for duplicate file fixture

This commit is contained in:
Orhun Parmaksız 2022-05-21 17:51:28 +03:00
parent cccbf98acc
commit 00167db3d6
No known key found for this signature in database
GPG key ID: F83424824B3E4B90
2 changed files with 3 additions and 3 deletions

View file

@ -4,6 +4,6 @@ max_content_length="10MB"
upload_path="./upload" upload_path="./upload"
[paste] [paste]
random_url = { enabled = false, type = "petname", words = 2, separator = "-" } random_url = { enabled = true, type = "petname", words = 2, separator = "-" }
default_extension = "txt" default_extension = "txt"
duplicate_files = true duplicate_files = false

View file

@ -11,7 +11,7 @@ setup() {
run_test() { run_test() {
first_file_url=$(curl -s -F "file=@file" localhost:8000) first_file_url=$(curl -s -F "file=@file" localhost:8000)
test "$duplicate_content" = "$(cat upload/file.txt)" test "$duplicate_content" = "$(cat upload/${first_file_url/http:\/\/localhost:8000\//})"
second_file_url=$(curl -s -F "file=@file" localhost:8000) second_file_url=$(curl -s -F "file=@file" localhost:8000)
test "$first_file_url" = "$second_file_url" test "$first_file_url" = "$second_file_url"