_test_security_group_precommit_create_event: Check the result of create

Related-Bug: #1724138
Related-Bug: #1698812
Change-Id: I31c07feb88b565970b9b97afacb7a53a5b28c137
This commit is contained in:
YAMAMOTO Takashi 2017-10-17 18:33:14 +09:00
parent b520b16d8a
commit 445ce14ec1
1 changed files with 5 additions and 0 deletions

View File

@ -313,6 +313,11 @@ class SecurityGroupDbMixinTestCase(testlib_api.SqlTestCase):
mock.call('security_group', 'after_create', mock.ANY,
context=mock.ANY, is_default=False,
security_group=sg_dict)])
# Ensure that the result of create is same as get.
# Especially we want to check the revision number here.
sg_dict_got = self.mixin.get_security_group(
self.ctx, sg_dict['id'])
self.assertEqual(sg_dict, sg_dict_got)
def test_security_group_precommit_create_event_with_revisions(self):
revision = revision_plugin.RevisionPlugin()