From 3f2b112bfc12f21fa14f8f5a2574026b058cc2f7 Mon Sep 17 00:00:00 2001 From: Akhilesh Samineni <47657796+AkhileshSamineni@users.noreply.github.com> Date: Wed, 26 Feb 2020 02:36:18 +0530 Subject: [PATCH] [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 --- tests/test_nat.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/test_nat.py b/tests/test_nat.py index 19098ba1c938..9848028b343b 100644 --- a/tests/test_nat.py +++ b/tests/test_nat.py @@ -7,9 +7,6 @@ from swsscommon import swsscommon - -# FIXME: https://github.com/Azure/sonic-swss/issues/1199 -@pytest.mark.xfail(reason="DVS crashes during NAT test execution") class TestNat(object): def setup_db(self, dvs): self.appdb = swsscommon.DBConnector(0, dvs.redis_sock, 0) @@ -84,8 +81,14 @@ def test_NatInterfaceZone(self, dvs, testlog): keys = tbl.getKeys() (status, fvs) = tbl.get("Ethernet0") - - assert fvs==(('NULL', 'NULL'), ('nat_zone', '1')) + assert status == True + assert len(fvs) > 0 + zone = False + for fv in fvs: + if fv[0] == 'nat_zone' and fv[1] == '1': + zone = True + break + assert zone == True def test_AddNatStaticEntry(self, dvs, testlog):