Last active
August 29, 2015 14:02
-
-
Save portante/a393d072615c0862481a to your computer and use it in GitHub Desktop.
Simple patch so that failing unit tests with missing storage polices don't instead report versioning not enabled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/functional/tests.py b/test/functional/tests.py | |
index b52082c..16f49bd 100644 | |
--- a/test/functional/tests.py | |
+++ b/test/functional/tests.py | |
@@ -2087,7 +2087,12 @@ class TestCrossPolicyObjectVersioningEnv(object): | |
cls.multiple_policies_enabled = True | |
else: | |
cls.multiple_policies_enabled = False | |
- cls.versioning_enabled = False | |
+ # We have to lie here that versioning is enabled. We actually | |
+ # don't know, but it does not matter. We know these tests cannot | |
+ # run without multiple policies present. If multiple policies are | |
+ # present, we won't be setting this field to any value, so it | |
+ # should all still work. | |
+ cls.versioning_enabled = True | |
return | |
policy = cls.policies.select() | |
diff --git a/test/functional/__init__.py b/test/functional/__init__.py | |
index 04ccb09..3e6f968 100644 | |
--- a/test/functional/__init__.py | |
+++ b/test/functional/__init__.py | |
@@ -721,7 +721,7 @@ def requires_policies(f): | |
self.policies = FunctionalStoragePolicyCollection.from_info() | |
assert len(self.policies) > 1 | |
except AssertionError: | |
- raise SkipTest() | |
+ raise SkipTest("Multiple policies not enabled") | |
try: | |
rv = f(self, *args, **kwargs) | |
except: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment