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.
This commit is contained in:
+1
-1
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user