From 10059459f38c03bf012f918d670537cec5eab3d4 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Tue, 29 May 2018 18:12:27 -0700 Subject: [PATCH] tests: Fix test_find comparaison test (#2455) `mc find alias/bucket` without trailing slash is actually printing 'alias/bucket' as first element in the output, the thing which is not taken into consideration in test_find test. This commit will ask `mc find` to list 'alias/bucket/' instead to have a similar output as gnu `ls` cmd. --- functional-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functional-tests.sh b/functional-tests.sh index c733d979..1dbe9b82 100755 --- a/functional-tests.sh +++ b/functional-tests.sh @@ -496,7 +496,7 @@ function test_find() { assert_success "$start_time" "${FUNCNAME[0]}" mc_cmd mb "${SERVER_ALIAS}/${bucket_name}" assert_success "$start_time" "${FUNCNAME[0]}" mc_cmd mirror "$DATA_DIR" "${SERVER_ALIAS}/${bucket_name}" - diff -bB <(ls "$DATA_DIR") <("${MC_CMD[@]}" --json find "${SERVER_ALIAS}/${bucket_name}" | jq -r .key | sed "s/${SERVER_ALIAS}\/${bucket_name}\///g") >/dev/null 2>&1 + diff -bB <(ls "$DATA_DIR") <("${MC_CMD[@]}" --json find "${SERVER_ALIAS}/${bucket_name}/" | jq -r .key | sed "s/${SERVER_ALIAS}\/${bucket_name}\///g") >/dev/null 2>&1 assert_success "$start_time" "${FUNCNAME[0]}" show_on_failure $? "mirror and list differs" assert_success "$start_time" "${FUNCNAME[0]}" mc_cmd rm --force --recursive "${SERVER_ALIAS}/${bucket_name}"