Skip to content

[iface_namingmode] : test_show_ip_route_v4, test_show_ip_route_v6 failing on single asic dut #2454

@oxygen980

Description

@oxygen980

Description
for t1 topology 'test_show_ip_route_v4, test_show_ip_route_v6 failing ' testcases failing.

Steps to reproduce the issue:

  1. configure dut
  2. Run the testcase

Describe the results you received:

self = <test_iface_namingmode.TestShowIP instance at 0x7f2d7b7d8518>, setup_config_mode = (<tests.common.devices.AnsibleHostBase object at 0x7f2d6fc4bad0>, 'default', 'default')
spine_ports = {'alias': ['TestAlias2', 'TestAlias4', 'TestAlias5', 'TestAlias7'], 'interface': ['Ethernet9', 'Ethernet3', 'Ethernet0', 'Ethernet6']}

def test_show_ip_route_v4(self, setup_config_mode, spine_ports):
    """
    Checks whether 'show ip route <ip>' lists the interface name as
    per the configured naming mode
    """
    dutHostGuest, mode, ifmode = setup_config_mode
    route = dutHostGuest.shell('SONIC_CLI_IFACE_MODE={} show ip route 192.168.1.1'.format(ifmode))['stdout']
    #route = dutHostGuest.shell('SONIC_CLI_IFACE_MODE={} show ip route'.format(ifmode))['stdout']
    logger.info('route:\n{}'.format(route))

    if mode == 'alias':
        for alias in spine_ports['alias']:

            assert re.search(r'via {}'.format(alias), route) is not None
    elif mode == 'default':
        for intf in spine_ports['interface']:
          assert re.search(r'via {}'.format(intf), route) is not None

E AssertionError

dutHostGuest = <tests.common.devices.AnsibleHostBase object at 0x7f2d6fc4bad0>
ifmode = 'default'
intf = 'Ethernet9'
mode = 'default'
route = u'Routing entry for 0.0.0.0/0\n Known via "kernel", distance 0, metric 0, best\n Last update 02:41:48 ago\n * 10.0.0.16, via enp12s0f1.2'
self = <test_iface_namingmode.TestShowIP instance at 0x7f2d7b7d8518>
setup_config_mode = (<tests.common.devices.AnsibleHostBase object at 0x7f2d6fc4bad0>, 'default', 'default')
spine_ports = {'alias': ['TestAlias2', 'TestAlias4', 'TestAlias5', 'TestAlias7'], 'interface': ['Ethernet9', 'Ethernet3', 'Ethernet0', 'Ethernet6']}

iface_namingmode/test_iface_namingmode.py:895: AssertionError
----------------------------------------------------------------------------------- generated xml file: /data/tests/logs/tr.x

Describe the results you expected:
should pass

Additional information you deem important:

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions