Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions tests/dualtor/test_standby_tor_upstream_mux_toggle.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import pytest
import logging
import ipaddress
import json
import re
import time
from tests.common.dualtor.dual_tor_mock import *
from tests.common.helpers.assertions import pytest_assert as pt_assert
Expand All @@ -21,22 +19,6 @@

PAUSE_TIME = 10

def get_l2_rx_drop(host, itfs):
"""
Return L2 rx packet drop counter for given interface
"""
res = {}
stdout = host.shell("portstat -j")['stdout']
match = re.search("Last cached time was.*\n", stdout)
if match:
stdout = re.sub("Last cached time was.*\n", "", stdout)
data = json.loads(stdout)
return int(data[itfs]['RX_DRP'])


def clear_portstat(dut):
dut.shell("portstat -c")


@pytest.fixture(scope='module', autouse=True)
def test_cleanup(rand_selected_dut):
Expand Down Expand Up @@ -67,11 +49,6 @@ def test_standby_tor_upstream_mux_toggle(
drop=True)

time.sleep(5)
# Verify dropcounter is increased
drop_counter = get_l2_rx_drop(rand_selected_dut, itfs)
pt_assert(drop_counter >= PKT_NUM,
"RX_DRP for {} is expected to increase by {} actually {}".format(itfs, PKT_NUM, drop_counter))

# Step 2. Toggle mux state to active, and verify traffic is not dropped by ACL and fwd-ed to uplinks; verify CRM show and no nexthop objects are stale
set_mux_state(rand_selected_dut, tbinfo, 'active', [itfs], toggle_all_simulator_ports)
# Wait sometime for mux toggle
Expand All @@ -97,10 +74,6 @@ def test_standby_tor_upstream_mux_toggle(
server_ip=ip['server_ipv4'].split('/')[0],
pkt_num=PKT_NUM,
drop=True)
# Verify dropcounter is increased
drop_counter = get_l2_rx_drop(rand_selected_dut, itfs)
pt_assert(drop_counter >= PKT_NUM,
"RX_DRP for {} is expected to increase by {} actually {}".format(itfs, PKT_NUM, drop_counter))
crm_facts1 = rand_selected_dut.get_crm_facts()
unmatched_crm_facts = compare_crm_facts(crm_facts0, crm_facts1)
pt_assert(len(unmatched_crm_facts)==0, 'Unmatched CRM facts: {}'.format(json.dumps(unmatched_crm_facts, indent=4)))
Expand Down