From 00167db3d685df361e082c019abe12dcf1f3ce8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sat, 21 May 2022 17:51:28 +0300 Subject: [PATCH] fix(fixtures): enable random URLs for duplicate file fixture --- fixtures/test-duplicate-file-upload/config.toml | 4 ++-- fixtures/test-duplicate-file-upload/test.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fixtures/test-duplicate-file-upload/config.toml b/fixtures/test-duplicate-file-upload/config.toml index a949e05..ed7240f 100644 --- a/fixtures/test-duplicate-file-upload/config.toml +++ b/fixtures/test-duplicate-file-upload/config.toml @@ -4,6 +4,6 @@ max_content_length="10MB" upload_path="./upload" [paste] -random_url = { enabled = false, type = "petname", words = 2, separator = "-" } +random_url = { enabled = true, type = "petname", words = 2, separator = "-" } default_extension = "txt" -duplicate_files = true +duplicate_files = false diff --git a/fixtures/test-duplicate-file-upload/test.sh b/fixtures/test-duplicate-file-upload/test.sh index 935e4d1..ae5b3fb 100755 --- a/fixtures/test-duplicate-file-upload/test.sh +++ b/fixtures/test-duplicate-file-upload/test.sh @@ -11,7 +11,7 @@ setup() { run_test() { 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) test "$first_file_url" = "$second_file_url"