From 1004509cab443a5cbb223ffc8258c45cb97ee5fb Mon Sep 17 00:00:00 2001 From: Alistair Coles Date: Thu, 29 Sep 2016 19:22:36 +0100 Subject: [PATCH] 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 --- test/functional/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/tests.py b/test/functional/tests.py index c70560f630..76a48715ff 100644 --- a/test/functional/tests.py +++ b/test/functional/tests.py @@ -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