ceph / ceph/s3-tests

Check grants on test_object_header_acl_grants failing due sort problem

Open
#68 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
372
Forks
328
PR merge metrics
No merged PRs in 30d

Description

test_object_header_acl_grants is failing with
Traceback (most recent call last):
File "/tmp/s3-tests-master/virtualenv/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/tmp/s3-tests-master/s3tests/functional/test_s3.py", line 3861, in test_object_header_acl_grants
type='CanonicalUser',
File "/tmp/s3-tests-master/s3tests/functional/test_s3.py", line 80, in check_grants
eq(g.permission, w.pop('permission'))
AssertionError: u'FULL_CONTROL' != 'READ'

And it seems is due sorting that is failing. I changed to sort by permission in check_grants and the compares succeed.

def check_grants(got, want):
...
eq(len(got), len(want))
got = sorted(got, key=operator.attrgetter('permission'))
want = sorted(want, key=operator.itemgetter('permission'))
...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.