Skip to content

Commit 3f2b112

Browse files
[dvs] Re-enable NAT test cases (#1205)
* Removed the xfail mark for NAT test cases * Fixed the "test_NatInterfaceZone" test case failure Signed-off-by: Akhilesh Samineni <[email protected]>
1 parent 2c243d7 commit 3f2b112

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/test_nat.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
from swsscommon import swsscommon
99

10-
11-
# FIXME: https://github.com/Azure/sonic-swss/issues/1199
12-
@pytest.mark.xfail(reason="DVS crashes during NAT test execution")
1310
class TestNat(object):
1411
def setup_db(self, dvs):
1512
self.appdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)
@@ -84,8 +81,14 @@ def test_NatInterfaceZone(self, dvs, testlog):
8481
keys = tbl.getKeys()
8582

8683
(status, fvs) = tbl.get("Ethernet0")
87-
88-
assert fvs==(('NULL', 'NULL'), ('nat_zone', '1'))
84+
assert status == True
85+
assert len(fvs) > 0
86+
zone = False
87+
for fv in fvs:
88+
if fv[0] == 'nat_zone' and fv[1] == '1':
89+
zone = True
90+
break
91+
assert zone == True
8992

9093

9194
def test_AddNatStaticEntry(self, dvs, testlog):

0 commit comments

Comments
 (0)