Fix failing cross-policy-versioning functional test

Since [1] the functional tests for cross-policy
object versioning fails with an error. These tests are
skipped in all CI test jobs because none of them have
more than one policy enabled. However, when running
tests against a system with multiple policies the tests
will not skip and the error is raised.

[1] Related-Change: Ifebc1c3ce558b1df9e576a58a4100f2219dfc7e7

Related-Bug: #1629234

Change-Id: I48028928bc996252a31cbf3abfd2b5e67a74dc95
This commit is contained in:
Alistair Coles 2016-09-29 19:22:36 +01:00
parent 3ae0b80bbd
commit 1004509cab
1 changed files with 2 additions and 1 deletions

View File

@ -3998,6 +3998,7 @@ class TestCrossPolicyObjectVersioningEnv(object):
versioning_enabled = None
multiple_policies_enabled = None
policies = None
location_header_key = 'X-Versions-Location'
@classmethod
def setUp(cls):
@ -4045,7 +4046,7 @@ class TestCrossPolicyObjectVersioningEnv(object):
cls.container = cls.account.container(prefix + "-objs")
if not cls.container.create(
hdrs={'X-Versions-Location': cls.versions_container.name,
hdrs={cls.location_header_key: cls.versions_container.name,
'X-Storage-Policy': version_policy['name']}):
if cls.conn.response.status == 412:
cls.versioning_enabled = False