Commit f73f3567 authored by Bernardo Dal Seno's avatar Bernardo Dal Seno
Browse files

Unit test for FillIPolicy keeping unknown keys

This makes sure that issue 401 doesn't come back.
Signed-off-by: default avatarBernardo Dal Seno <>
Reviewed-by: default avatarHelga Velroyen <>
parent bcba4e01
......@@ -678,6 +678,14 @@ class TestInstancePolicy(unittest.TestCase):
self._AssertIPolicyMerged(constants.IPOLICY_DEFAULTS, diff_pol, policy)
def testFillIPolicyKeepsUnknown(self):
INVALID_KEY = "invalid_ipolicy_key"
diff_pol = {
policy = objects.FillIPolicy(constants.IPOLICY_DEFAULTS, diff_pol)
self.assertTrue(INVALID_KEY in policy)
if __name__ == "__main__":
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment