forked from TrueCloudLab/s3-tests
Compare commits
3 commits
master
...
ceph-mimic
Author | SHA1 | Date | |
---|---|---|---|
|
176b76fb71 | ||
|
bc7e9d6eea | ||
|
2ab737206b |
3 changed files with 6 additions and 21 deletions
10
bootstrap
10
bootstrap
|
@ -2,7 +2,7 @@
|
|||
set -e
|
||||
|
||||
if [ -f /etc/debian_version ]; then
|
||||
for package in python-pip python-virtualenv python-dev libevent-dev libxml2-dev libxslt-dev zlib1g-dev; do
|
||||
for package in python-pip python-virtualenv python-dev libevent-dev libffi-dev libxml2-dev libxslt-dev zlib1g-dev; do
|
||||
if [ "$(dpkg --status -- $package 2>/dev/null|sed -n 's/^Status: //p')" != "install ok installed" ]; then
|
||||
# add a space after old values
|
||||
missing="${missing:+$missing }$package"
|
||||
|
@ -13,7 +13,7 @@ if [ -f /etc/debian_version ]; then
|
|||
sudo apt-get -y install $missing
|
||||
fi
|
||||
elif [ -f /etc/fedora-release ]; then
|
||||
for package in python-pip python2-virtualenv python-devel libevent-devel libxml2-devel libxslt-devel zlib-devel; do
|
||||
for package in python-pip python2-virtualenv python-devel libevent-devel libffi-devel libxml2-devel libxslt-devel zlib-devel; do
|
||||
if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then
|
||||
missing="${missing:+$missing }$package"
|
||||
fi
|
||||
|
@ -23,7 +23,7 @@ elif [ -f /etc/fedora-release ]; then
|
|||
sudo yum -y install $missing
|
||||
fi
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
for package in python-virtualenv python-devel libevent-devel libxml2-devel libxslt-devel zlib-devel; do
|
||||
for package in python-virtualenv python-devel libevent-devel libffi-devel libxml2-devel libxslt-devel zlib-devel; do
|
||||
if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then
|
||||
missing="${missing:+$missing }$package"
|
||||
fi
|
||||
|
@ -39,8 +39,8 @@ virtualenv --no-site-packages --distribute virtualenv
|
|||
# avoid pip bugs
|
||||
./virtualenv/bin/pip install --upgrade pip
|
||||
|
||||
# slightly old version of setuptools; newer fails w/ requests 0.14.0
|
||||
./virtualenv/bin/pip install setuptools==32.3.1
|
||||
# latest setuptools supporting python 2.7
|
||||
./virtualenv/bin/pip install setuptools==44.1.0
|
||||
|
||||
./virtualenv/bin/pip install -r requirements.txt
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ bunch >=1.0.0
|
|||
# 0.14 switches to libev, that means bootstrap needs to change too
|
||||
gevent >=1.0
|
||||
isodate >=0.4.4
|
||||
requests >=0.14.0
|
||||
requests >=2.23.0
|
||||
pytz >=2011k
|
||||
ordereddict
|
||||
httplib2
|
||||
|
|
|
@ -7775,21 +7775,6 @@ def test_lifecycle_invalid_status():
|
|||
eq(e.status, 400)
|
||||
eq(e.error_code, 'MalformedXML')
|
||||
|
||||
@attr(resource='bucket')
|
||||
@attr(method='put')
|
||||
@attr(operation='rules conflicted in lifecycle')
|
||||
@attr('lifecycle')
|
||||
@attr(assertion='fails 400')
|
||||
def test_lifecycle_rules_conflicted():
|
||||
bucket = get_new_bucket()
|
||||
lifecycle = create_lifecycle(rules=[{'id': 'rule1', 'days': 2, 'prefix': 'test1/', 'status': 'Enabled'},
|
||||
{'id': 'rule2', 'days': 3, 'prefix': 'test3/', 'status': 'Enabled'},
|
||||
{'id': 'rule3', 'days': 5, 'prefix': 'test1/abc', 'status': 'Enabled'}])
|
||||
e = assert_raises(boto.exception.S3ResponseError, bucket.configure_lifecycle, lifecycle)
|
||||
eq(e.status, 400)
|
||||
eq(e.error_code, 'InvalidRequest')
|
||||
|
||||
|
||||
def generate_lifecycle_body(rules):
|
||||
body = '<?xml version="1.0" encoding="UTF-8"?><LifecycleConfiguration>'
|
||||
for rule in rules:
|
||||
|
|
Loading…
Reference in a new issue