From 4497c6064aad5603ccd5c09e651294a2a4e6b542 Mon Sep 17 00:00:00 2001 From: sanjeevn Date: Thu, 7 Jan 2016 14:34:05 +0530 Subject: [PATCH] Added few validation steps after adding vpncustomer gateway with hostname Changes are as per review comments in PR#1308 --- test/integration/component/test_vpc.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/integration/component/test_vpc.py b/test/integration/component/test_vpc.py index 0cde535f850..5f7ea98b5fa 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