Skip to content

Instantly share code, notes, and snippets.

@portante
Created June 17, 2014 03:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save portante/6ab72faa6db065d32a8e to your computer and use it in GitHub Desktop.
Save portante/6ab72faa6db065d32a8e to your computer and use it in GitHub Desktop.
A simple patch to skip a set of probe tests when there is no container-reconciler.conf file present.
diff --git a/test/probe/test_container_merge_policy_index.py b/test/probe/test_container_merge_policy_index.py
index 5a5054c..b44ecc3 100644
--- a/test/probe/test_container_merge_policy_index.py
+++ b/test/probe/test_container_merge_policy_index.py
@@ -175,7 +175,11 @@ class TestContainerMergePolicyIndex(unittest.TestCase):
def setUp(self):
if len(POLICIES) < 2:
- raise SkipTest()
+ raise SkipTest("Multiple storage policies not present")
+ if not os.path.exists('/etc/swift/container-reconciler.conf'):
+ raise SkipTest("Container reconciler configuration file,"
+ " '/etc/swift/container-reconciler.conf',"
+ " not present")
(self.pids, self.port2server, self.account_ring, self.container_ring,
self.object_ring, self.policy, self.url, self.token,
self.account, self.configs) = reset_environment()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment