Skip to content

Commit 3e3dc73

Browse files
Gaurav AradhyeGirish Shilamkar
authored andcommitted
CLOUDSTACK-6726: Fixing BVT test case test_network.py
1 parent 26fa623 commit 3e3dc73

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

test/integration/smoke/test_network.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,12 +389,13 @@ def test_01_port_fwd_on_src_nat(self):
389389

390390
try:
391391
nat_rule.delete(self.apiclient)
392-
list_nat_rule_response = list_nat_rules(
393-
self.apiclient,
394-
id=nat_rule.id
395-
)
396-
except CloudstackAPIException:
397-
self.fail("Nat Rule Deletion or Listing Failed")
392+
except Exception as e:
393+
self.fail("NAT Rule Deletion Failed: %s" % e)
394+
395+
# NAT rule listing should fail as the nat rule does not exist
396+
with self.assertRaises(Exception):
397+
list_nat_rules(self.apiclient,
398+
id=nat_rule.id)
398399

399400
# Check if the Public SSH port is inaccessible
400401
with self.assertRaises(Exception):

0 commit comments

Comments
 (0)