Skip to content

Commit 4497c60

Browse files
sanjeevneelarapusanjeev
authored andcommitted
Added few validation steps after adding vpncustomer gateway with hostname
Changes are as per review comments in PR#1308
1 parent 88327b9 commit 4497c60

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

test/integration/component/test_vpc.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from marvin.cloudstackTestCase import cloudstackTestCase
2323
from marvin.cloudstackException import CloudstackAPIException
2424
from marvin.cloudstackAPI import updateZone
25-
from marvin.lib.utils import cleanup_resources
25+
from marvin.lib.utils import cleanup_resources, validateList
2626
from marvin.lib.base import (Account,
2727
VPC,
2828
VpcOffering,
@@ -42,6 +42,7 @@
4242
get_zone,
4343
get_template,
4444
list_configurations)
45+
from marvin.codes import PASS
4546
import time
4647

4748

@@ -2517,4 +2518,18 @@ def test_22_vpn_customer_gw_with_hostname(self):
25172518
except Exception as e:
25182519
self.fail("Creating vpn customer gateway with hostname\
25192520
Failed with error :%s" % e)
2521+
vpn_cgw_res = VpnCustomerGateway.list(
2522+
self.apiclient,
2523+
id=vpnGw.id
2524+
)
2525+
self.assertEqual(
2526+
validateList(vpn_cgw_res)[0],
2527+
PASS,
2528+
"Invalid response for list vpncustomer gateways"
2529+
)
2530+
self.assertEqual(
2531+
vpnGw.gateway,
2532+
vpn_cgw_res[0].gateway,
2533+
"Mismatch in vpn customer gateway names"
2534+
)
25202535
return

0 commit comments

Comments
 (0)