forked from TrueCloudLab/s3-tests
Compare commits
6 commits
master
...
ceph-jewel
Author | SHA1 | Date | |
---|---|---|---|
|
601dc256eb | ||
|
f2e71ed5c4 | ||
|
4a7fe5fb4b | ||
|
a65d1b490d | ||
|
218987825f | ||
|
dfc7a1271b |
2 changed files with 82 additions and 6 deletions
21
bootstrap
21
bootstrap
|
@ -2,7 +2,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ -f /etc/debian_version ]; then
|
if [ -f /etc/debian_version ]; then
|
||||||
for package in python-pip python-virtualenv python-dev libevent-dev; do
|
for package in python-pip python-virtualenv python-dev libevent-dev libffi-dev; do
|
||||||
if [ "$(dpkg --status -- $package 2>/dev/null|sed -n 's/^Status: //p')" != "install ok installed" ]; then
|
if [ "$(dpkg --status -- $package 2>/dev/null|sed -n 's/^Status: //p')" != "install ok installed" ]; then
|
||||||
# add a space after old values
|
# add a space after old values
|
||||||
missing="${missing:+$missing }$package"
|
missing="${missing:+$missing }$package"
|
||||||
|
@ -12,9 +12,18 @@ if [ -f /etc/debian_version ]; then
|
||||||
echo "$0: missing required DEB packages. Installing via sudo." 1>&2
|
echo "$0: missing required DEB packages. Installing via sudo." 1>&2
|
||||||
sudo apt-get -y install $missing
|
sudo apt-get -y install $missing
|
||||||
fi
|
fi
|
||||||
fi
|
elif [ -f /etc/fedora-release ]; then
|
||||||
if [ -f /etc/redhat-release ]; then
|
for package in python-pip python2-virtualenv python-devel libevent-devel libffi-devel; do
|
||||||
for package in python-pip python-virtualenv python-devel libevent-devel; do
|
if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then
|
||||||
|
missing="${missing:+$missing }$package"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ -n "$missing" ]; then
|
||||||
|
echo "$0: missing required RPM packages. Installing via sudo." 1>&2
|
||||||
|
sudo yum -y install $missing
|
||||||
|
fi
|
||||||
|
elif [ -f /etc/redhat-release ]; then
|
||||||
|
for package in python2-pip python-virtualenv python-devel libevent-devel libffi-devel; do
|
||||||
if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then
|
if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then
|
||||||
missing="${missing:+$missing }$package"
|
missing="${missing:+$missing }$package"
|
||||||
fi
|
fi
|
||||||
|
@ -30,8 +39,8 @@ virtualenv --no-site-packages --distribute virtualenv
|
||||||
# avoid pip bugs
|
# avoid pip bugs
|
||||||
./virtualenv/bin/pip install --upgrade pip
|
./virtualenv/bin/pip install --upgrade pip
|
||||||
|
|
||||||
# work-around change in pip 1.5
|
# slightly old version of setuptools; newer fails w/ requests 0.14.0
|
||||||
./virtualenv/bin/pip install setuptools --no-use-wheel --upgrade
|
./virtualenv/bin/pip install setuptools==32.3.1
|
||||||
|
|
||||||
./virtualenv/bin/pip install -r requirements.txt
|
./virtualenv/bin/pip install -r requirements.txt
|
||||||
|
|
||||||
|
|
|
@ -1012,6 +1012,7 @@ def test_multi_object_delete():
|
||||||
@attr(method='put')
|
@attr(method='put')
|
||||||
@attr(operation='write zero-byte key')
|
@attr(operation='write zero-byte key')
|
||||||
@attr(assertion='correct content length')
|
@attr(assertion='correct content length')
|
||||||
|
@attr('fails_on_rgw') # actually, just apache; works with civetweb.
|
||||||
def test_object_head_zero_bytes():
|
def test_object_head_zero_bytes():
|
||||||
bucket = get_new_bucket()
|
bucket = get_new_bucket()
|
||||||
key = bucket.new_key('foo')
|
key = bucket.new_key('foo')
|
||||||
|
@ -6767,6 +6768,72 @@ def test_versioned_object_acl():
|
||||||
k = bucket.new_key(keyname)
|
k = bucket.new_key(keyname)
|
||||||
check_grants(k.get_acl().acl.grants, default_policy)
|
check_grants(k.get_acl().acl.grants, default_policy)
|
||||||
|
|
||||||
|
@attr(resource='object')
|
||||||
|
@attr(method='put')
|
||||||
|
@attr(operation='change acl on an object with no version specified changes latest version')
|
||||||
|
@attr(assertion='works')
|
||||||
|
@attr('versioning')
|
||||||
|
def test_versioned_object_acl_no_version_specified():
|
||||||
|
bucket = get_new_bucket()
|
||||||
|
|
||||||
|
check_configure_versioning_retry(bucket, True, "Enabled")
|
||||||
|
|
||||||
|
keyname = 'foo'
|
||||||
|
|
||||||
|
key0 = bucket.new_key(keyname)
|
||||||
|
key0.set_contents_from_string('bar')
|
||||||
|
key1 = bucket.new_key(keyname)
|
||||||
|
key1.set_contents_from_string('bla')
|
||||||
|
key2 = bucket.new_key(keyname)
|
||||||
|
key2.set_contents_from_string('zxc')
|
||||||
|
|
||||||
|
stored_keys = []
|
||||||
|
for key in bucket.list_versions():
|
||||||
|
stored_keys.insert(0, key)
|
||||||
|
|
||||||
|
k2 = stored_keys[2]
|
||||||
|
|
||||||
|
policy = bucket.get_acl(key_name=k2.name, version_id=k2.version_id)
|
||||||
|
|
||||||
|
default_policy = [
|
||||||
|
dict(
|
||||||
|
permission='FULL_CONTROL',
|
||||||
|
id=policy.owner.id,
|
||||||
|
display_name=policy.owner.display_name,
|
||||||
|
uri=None,
|
||||||
|
email_address=None,
|
||||||
|
type='CanonicalUser',
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
||||||
|
print repr(policy)
|
||||||
|
check_grants(policy.acl.grants, default_policy)
|
||||||
|
|
||||||
|
bucket.set_canned_acl('public-read', key_name=k2.name)
|
||||||
|
|
||||||
|
policy = bucket.get_acl(key_name=k2.name, version_id=k2.version_id)
|
||||||
|
print repr(policy)
|
||||||
|
check_grants(
|
||||||
|
policy.acl.grants,
|
||||||
|
[
|
||||||
|
dict(
|
||||||
|
permission='FULL_CONTROL',
|
||||||
|
id=policy.owner.id,
|
||||||
|
display_name=policy.owner.display_name,
|
||||||
|
uri=None,
|
||||||
|
email_address=None,
|
||||||
|
type='CanonicalUser',
|
||||||
|
),
|
||||||
|
dict(
|
||||||
|
permission='READ',
|
||||||
|
id=None,
|
||||||
|
display_name=None,
|
||||||
|
uri='http://acs.amazonaws.com/groups/global/AllUsers',
|
||||||
|
email_address=None,
|
||||||
|
type='Group',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
def _do_create_object(bucket, objname, i):
|
def _do_create_object(bucket, objname, i):
|
||||||
k = bucket.new_key(objname)
|
k = bucket.new_key(objname)
|
||||||
|
|
Loading…
Add table
Reference in a new issue