Fix recon tests on SAIO with multiple policies
Recon middleware used to only look on rings that exist on disk when it was started, so if a test didn't create a ring in the temp swift_dir it can expect the middleware to not report it. However, after we started looking at policies to determine rings [1] - we need to be more careful to patch policies to match up with the test requirements. On development environments with only the legacy default polices the existing recon tests were passing by accident - but not in my environment. This change will patch policies for the TestCase so that tests will pass for me. Individual test methods that have more specific policy requirements for the test can continue to @patch_policies just for those tests but in general the existing test_methods all seem to expect legacy policies - so we just make the default for the TestCase legacy_only. Change-Id: I778a0a59091ca8870e1cab985f3ec426eb045ab7
This commit is contained in:
parent
f4e6d39d4f
commit
1fe8e4327b
@ -193,6 +193,7 @@ class FakeRecon(object):
|
||||
raise Exception
|
||||
|
||||
|
||||
@patch_policies(legacy_only=True)
|
||||
class TestReconSuccess(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
Loading…
Reference in New Issue
Block a user