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 <bdalseno@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent bcba4e01
......@@ -678,6 +678,14 @@ class TestInstancePolicy(unittest.TestCase):
self._AssertIPolicyIsFull(policy)
self._AssertIPolicyMerged(constants.IPOLICY_DEFAULTS, diff_pol, policy)
def testFillIPolicyKeepsUnknown(self):
INVALID_KEY = "invalid_ipolicy_key"
diff_pol = {
INVALID_KEY: None,
}
policy = objects.FillIPolicy(constants.IPOLICY_DEFAULTS, diff_pol)
self.assertTrue(INVALID_KEY in policy)
if __name__ == "__main__":
testutils.GanetiTestProgram()
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