Added few validation steps after adding vpncustomer gateway with hostname Changes are as per review comments in PR#1308
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4497c606 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4497c606 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4497c606 Branch: refs/heads/master Commit: 4497c6064aad5603ccd5c09e651294a2a4e6b542 Parents: 88327b9 Author: sanjeevn <[email protected]> Authored: Thu Jan 7 14:34:05 2016 +0530 Committer: sanjeev <[email protected]> Committed: Fri Jan 8 16:22:31 2016 +0530 ---------------------------------------------------------------------- test/integration/component/test_vpc.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4497c606/test/integration/component/test_vpc.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_vpc.py b/test/integration/component/test_vpc.py index 0cde535..5f7ea98 100644 --- a/test/integration/component/test_vpc.py +++ b/test/integration/component/test_vpc.py @@ -22,7 +22,7 @@ from nose.plugins.attrib import attr from marvin.cloudstackTestCase import cloudstackTestCase from marvin.cloudstackException import CloudstackAPIException from marvin.cloudstackAPI import updateZone -from marvin.lib.utils import cleanup_resources +from marvin.lib.utils import cleanup_resources, validateList from marvin.lib.base import (Account, VPC, VpcOffering, @@ -42,6 +42,7 @@ from marvin.lib.common import (get_domain, get_zone, get_template, list_configurations) +from marvin.codes import PASS import time @@ -2517,4 +2518,18 @@ class TestVPC(cloudstackTestCase): except Exception as e: self.fail("Creating vpn customer gateway with hostname\ Failed with error :%s" % e) + vpn_cgw_res = VpnCustomerGateway.list( + self.apiclient, + id=vpnGw.id + ) + self.assertEqual( + validateList(vpn_cgw_res)[0], + PASS, + "Invalid response for list vpncustomer gateways" + ) + self.assertEqual( + vpnGw.gateway, + vpn_cgw_res[0].gateway, + "Mismatch in vpn customer gateway names" + ) return
