Skip to content

Commit cafed7f

Browse files
committed
fix unstable test
Looks like newer Swifts return the `x-symlink-target` header in lowercase.
1 parent 61be67d commit cafed7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,15 +519,15 @@ EOF
519519

520520
# check that the "only-symlink" job transfers symlink.txt as a regular file (it cannot
521521
# transfer as a symlink because the link target is missing on the target side)
522-
if curl -si -H "X-Auth-Token: ${OS_AUTH_TOKEN}" "${OS_STORAGE_URL}/${CONTAINER_BASE}-test9/only-symlink/just/a/symlink.txt?symlink=get" | grep -q '^X-Symlink-Target'; then
522+
if curl -si -H "X-Auth-Token: ${OS_AUTH_TOKEN}" "${OS_STORAGE_URL}/${CONTAINER_BASE}-test9/only-symlink/just/a/symlink.txt?symlink=get" | grep -qi '^X-Symlink-Target'; then
523523
printf "\e[1;31m>>\e[0;31m Expected only-symlink/just/a/symlink.txt not to be a symlink, but it is one:\e[0m\n"
524524
curl -si -H "X-Auth-Token: ${OS_AUTH_TOKEN}" "${OS_STORAGE_URL}/${CONTAINER_BASE}-test9/only-symlink/just/a/symlink.txt?symlink=get"
525525
exit 1
526526
fi
527527

528528
# check that the "symlink-and-target" job transfers symlink.txt as a symlink
529529
# (since its link target is also included in the job)
530-
if ! curl -si -H "X-Auth-Token: ${OS_AUTH_TOKEN}" "${OS_STORAGE_URL}/${CONTAINER_BASE}-test9/symlink-and-target/just/a/symlink.txt?symlink=get" | grep -q '^X-Symlink-Target'; then
530+
if ! curl -si -H "X-Auth-Token: ${OS_AUTH_TOKEN}" "${OS_STORAGE_URL}/${CONTAINER_BASE}-test9/symlink-and-target/just/a/symlink.txt?symlink=get" | grep -qi '^X-Symlink-Target'; then
531531
printf "\e[1;31m>>\e[0;31m Expected symlink-and-target/just/a/symlink.txt to be a symlink, but it is not:\e[0m\n"
532532
curl -si -H "X-Auth-Token: ${OS_AUTH_TOKEN}" "${OS_STORAGE_URL}/${CONTAINER_BASE}-test9/symlink-and-target/just/a/symlink.txt?symlink=get"
533533
exit 1

0 commit comments

Comments
 (0)