From 542de7ff8f371657fa31c5079fe51fa08f7a287b Mon Sep 17 00:00:00 2001 From: Artem Medvedev Date: Sun, 10 Dec 2023 00:00:27 +0100 Subject: [PATCH] test: fix naming --- fixtures/test-list-files-not-exposed/test.sh | 2 +- fixtures/test-server-auth-tokens-unset/test.sh | 11 +++++------ fixtures/test-server-delete-tokens-unset/test.sh | 11 ++++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/fixtures/test-list-files-not-exposed/test.sh b/fixtures/test-list-files-not-exposed/test.sh index cd3735bd..bc7cade7 100755 --- a/fixtures/test-list-files-not-exposed/test.sh +++ b/fixtures/test-list-files-not-exposed/test.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash setup() { - echo "$content" > file + :; } run_test() { diff --git a/fixtures/test-server-auth-tokens-unset/test.sh b/fixtures/test-server-auth-tokens-unset/test.sh index 77b03077..2c0a7454 100755 --- a/fixtures/test-server-auth-tokens-unset/test.sh +++ b/fixtures/test-server-auth-tokens-unset/test.sh @@ -1,17 +1,16 @@ #!/usr/bin/env bash -content="test data" +content="topsecret" setup() { echo "$content" > file } run_test() { - file_url=$(curl -s -F "file=@file" localhost:8000) - test "$file_url" = "http://localhost:8000/file.txt" - - result=$(curl -s --write-out "%{http_code}" -X DELETE http://localhost:8000/file.txt) - test "404" = "$result" + result=$(curl -s -F "file=@file" localhost:8000) + test "unauthorized" != "$result" + test "$content" = "$(cat upload/file.txt)" + test "$content" = "$(curl -s $result)" } teardown() { diff --git a/fixtures/test-server-delete-tokens-unset/test.sh b/fixtures/test-server-delete-tokens-unset/test.sh index 2c0a7454..77b03077 100755 --- a/fixtures/test-server-delete-tokens-unset/test.sh +++ b/fixtures/test-server-delete-tokens-unset/test.sh @@ -1,16 +1,17 @@ #!/usr/bin/env bash -content="topsecret" +content="test data" setup() { echo "$content" > file } run_test() { - result=$(curl -s -F "file=@file" localhost:8000) - test "unauthorized" != "$result" - test "$content" = "$(cat upload/file.txt)" - test "$content" = "$(curl -s $result)" + file_url=$(curl -s -F "file=@file" localhost:8000) + test "$file_url" = "http://localhost:8000/file.txt" + + result=$(curl -s --write-out "%{http_code}" -X DELETE http://localhost:8000/file.txt) + test "404" = "$result" } teardown() {