fix: do not list delete-marked objects (#13864)

delete marked objects should not be considered
for listing when listing is delimited, this issue
as introduced in PR #13804 which was mainly to
address listing of directories in listing when
delimited.

This PR fixes this properly and adds tests to
ensure that we behave in accordance with how
an S3 API behaves for ListObjects() without
versions.
This commit is contained in:
Harshavardhana
2021-12-08 17:34:52 -08:00
committed by GitHub
parent 0a66a6f1e5
commit dcff6c996d
7 changed files with 83 additions and 16 deletions

View File

@@ -0,0 +1,14 @@
# To run locally an OpenLDAP instance using Docker
# $ docker-compose -f ldap.yaml up -d
version: '3.7'
services:
openldap:
image: quay.io/minio/openldap
ports:
- "389:389"
- "636:636"
environment:
LDAP_ORGANIZATION: "MinIO Inc"
LDAP_DOMAIN: "min.io"
LDAP_ADMIN_PASSWORD: "admin"

View File

@@ -136,4 +136,47 @@ if [ $? -eq 0 ]; then
exit_1;
fi
cleanup
./mc mb minio1/newbucket
sleep 5
./mc stat minio2/newbucket
if [ $? -eq 1 ]; then
echo "expecting bucket to be present. exiting.."
exit_1;
fi
./mc stat minio3/newbucket
if [ $? -eq 1 ]; then
echo "expecting bucket to be present. exiting.."
exit_1;
fi
./mc cp README.md minio2/newbucket/
sleep 5
./mc stat minio1/newbucket/README.md
if [ $? -eq 1 ]; then
echo "expecting object to be present. exiting.."
exit_1;
fi
./mc stat minio3/newbucket/README.md
if [ $? -eq 1 ]; then
echo "expecting object to be present. exiting.."
exit_1;
fi
./mc rm minio3/newbucket/README.md
sleep 5
./mc stat minio2/newbucket/README.md
if [ $? -eq 0 ]; then
echo "expected file to be deleted, exiting.."
exit_1;
fi
./mc stat minio1/newbucket/README.md
if [ $? -eq 0 ]; then
echo "expected file to be deleted, exiting.."
exit_1;
fi