Skip to content

Commit

Permalink
test: fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
DDtKey committed Dec 9, 2023
1 parent e1f3ed3 commit 542de7f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion fixtures/test-list-files-not-exposed/test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

setup() {
echo "$content" > file
:;
}

run_test() {
Expand Down
11 changes: 5 additions & 6 deletions fixtures/test-server-auth-tokens-unset/test.sh
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
11 changes: 6 additions & 5 deletions fixtures/test-server-delete-tokens-unset/test.sh
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down

0 comments on commit 542de7f

Please sign in to comment.