Skip to content

Commit

Permalink
[dvs] Re-enable NAT test cases (#1205)
Browse files Browse the repository at this point in the history
* Removed the xfail mark for NAT test cases
* Fixed the "test_NatInterfaceZone" test case failure

Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
  • Loading branch information
AkhileshSamineni committed Feb 25, 2020
1 parent 2c243d7 commit 3f2b112
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/test_nat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 3f2b112

Please sign in to comment.