Skip to content

Commit

Permalink
[test_mux]: Formatting fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Lawrence Lee <[email protected]>
  • Loading branch information
theasianpianist committed Feb 14, 2022
1 parent 7a0c3e7 commit 193a00d
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 99 deletions.
36 changes: 21 additions & 15 deletions tests/mux_neigh_miss_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
The expected result itself is another dictionary, containing the following
attributes:
- (bool) EXPECT_ROUTE: if we expect a route entry in ASIC_DB
- (bool) EXPECT_NEIGH: if we expect a neighbor entry in ASIC_DB
- (bool) EXPECT_NEIGH: if we expect a neighbor entry in ASIC_DB
- (bool) REAL_MAC: If a real MAC address is expected in the
APPL_DB neighbor table entry, as opposed
to a zero/empty MAC
Expand All @@ -26,25 +26,31 @@
"""

TEST_ACTION = 'action'
EXPECTED_RESULT = 'result'
__all__ = [
'TEST_ACTION', 'EXPECTED_RESULT', 'ACTIVE', 'STANDBY', 'PING_SERV', 'PING_NEIGH',
'RESOLVE_ENTRY', 'DELETE_ENTRY', 'EXPECT_ROUTE', 'EXPECT_NEIGH', 'REAL_MAC',
'INTF', 'IP', 'MAC', 'NEIGH_MISS_TESTS'
]

TEST_ACTION = 'action'
EXPECTED_RESULT = 'result'

# Possible test actions
ACTIVE = 'active' # Switch the test interface to active
STANDBY = 'standby' # Switch the test interface to standby
PING_SERV = 'ping_serv' # Ping the server mux cable IP
PING_NEIGH = 'ping_neigh' # Ping the neighbor IP (not configured on a specific mux cable port)
RESOLVE_ENTRY = 'resolve_entry' # Resolve the test IP neighbor entry in the kernel
DELETE_ENTRY = 'delete_entry' # Delete the test IP neighbor entry from the kernel
ACTIVE = 'active' # Switch the test interface to active
STANDBY = 'standby' # Switch the test interface to standby
PING_SERV = 'ping_serv' # Ping the server mux cable IP, used to trigger a netlink fail message
PING_NEIGH = 'ping_neigh' # Ping the neighbor IP (not configured on a specific mux cable port)
RESOLVE_ENTRY = 'resolve_entry' # Resolve the test IP neighbor entry in the kernel
DELETE_ENTRY = 'delete_entry' # Delete the test IP neighbor entry from the kernel

# Test expectations
EXPECT_ROUTE = 'expect_route'
EXPECT_NEIGH = 'expect_neigh'
REAL_MAC = 'real_mac'
EXPECT_ROUTE = 'expect_route'
EXPECT_NEIGH = 'expect_neigh'
REAL_MAC = 'real_mac'

INTF = 'intf'
IP = 'ip'
MAC = 'mac'
INTF = 'intf'
IP = 'ip'
MAC = 'mac'

# Note: For most test cases below, after the neighbor entry is deleted, we must
# still set `REAL_MAC` to `True` in the expected result since a prior step in the
Expand Down
Loading

0 comments on commit 193a00d

Please sign in to comment.