Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UT failed cause by change pycommon to use swsscommon #2085

Merged

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Mar 1, 2022

Fix UT failed cause by change sonic_py_common to use swss_common

Description

Fix UT failed cause by change sonic_py_common to use swss_common, here is UT failed message:

      2022-02-28T09:26:11.4706067Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      2022-02-28T09:26:11.4706457Z scripts/route_check.py:556: in main
      2022-02-28T09:26:11.4706805Z     ret, res= check_routes()
      2022-02-28T09:26:11.4707152Z scripts/route_check.py:491: in check_routes
      2022-02-28T09:26:11.4707567Z     rt_appl_miss = filter_out_local_interfaces(rt_appl_miss)
      2022-02-28T09:26:11.4708035Z scripts/route_check.py:352: in filter_out_local_interfaces
      2022-02-28T09:26:11.4708494Z     chassis_local_intfs = chassis.get_chassis_local_interfaces()
      2022-02-28T09:26:11.4708981Z utilities_common/chassis.py:7: in get_chassis_local_interfaces
      2022-02-28T09:26:11.4709703Z     chassisdb_conf=os.path.join('/usr/share/sonic/device/', platform, "chassisdb.conf")
      2022-02-28T09:26:11.4710280Z /usr/lib/python3.7/posixpath.py:94: in join
      2022-02-28T09:26:11.4710838Z     genericpath._check_arg_types('join', a, *p)
      2022-02-28T09:26:11.4711261Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

The UT failed because device_info.get_platform() return null, to fix this issue, add mock method for device_info.get_platform().

Motivation and Context

pyswss will be deprecate, so sonic_py_common will changed to use swss_common.
Some UT in this project failed because this change.

How Has This Been Tested?

Pass all UT and sonic-buildimage E2E test.

Additional Information (Optional)

@liuh-80
Copy link
Contributor Author

liuh-80 commented Mar 4, 2022

The PR check failed because UT issue in sonic-swss, which already have a PR to fix the issue:
sonic-net/sonic-swss#2166

@liuh-80 liuh-80 marked this pull request as ready for review March 4, 2022 07:18
@liuh-80 liuh-80 requested a review from qiluo-msft March 4, 2022 07:18
@liuh-80
Copy link
Contributor Author

liuh-80 commented Mar 10, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft
Copy link
Contributor

Could you add "UT failed" message into PR description?

@liuh-80
Copy link
Contributor Author

liuh-80 commented Mar 14, 2022

Could you add "UT failed" message into PR description?

PR description updated.

@qiluo-msft qiluo-msft merged commit 1cf1d03 into sonic-net:master Mar 17, 2022
vivekrnv pushed a commit to vivekrnv/sonic-utilities that referenced this pull request Jun 23, 2022
)

Fix UT failed cause by change sonic_py_common to use swss_common

#### Description
    Fix UT failed cause by change sonic_py_common to use swss_common, here is UT failed message:

          2022-02-28T09:26:11.4706067Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
          2022-02-28T09:26:11.4706457Z scripts/route_check.py:556: in main
          2022-02-28T09:26:11.4706805Z     ret, res= check_routes()
          2022-02-28T09:26:11.4707152Z scripts/route_check.py:491: in check_routes
          2022-02-28T09:26:11.4707567Z     rt_appl_miss = filter_out_local_interfaces(rt_appl_miss)
          2022-02-28T09:26:11.4708035Z scripts/route_check.py:352: in filter_out_local_interfaces
          2022-02-28T09:26:11.4708494Z     chassis_local_intfs = chassis.get_chassis_local_interfaces()
          2022-02-28T09:26:11.4708981Z utilities_common/chassis.py:7: in get_chassis_local_interfaces
          2022-02-28T09:26:11.4709703Z     chassisdb_conf=os.path.join('/usr/share/sonic/device/', platform, "chassisdb.conf")
          2022-02-28T09:26:11.4710280Z /usr/lib/python3.7/posixpath.py:94: in join
          2022-02-28T09:26:11.4710838Z     genericpath._check_arg_types('join', a, *p)
          2022-02-28T09:26:11.4711261Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    The UT failed because device_info.get_platform() return null, to fix this issue, add mock method for device_info.get_platform().

#### Motivation and Context
    pyswss will be deprecate, so sonic_py_common will changed to use swss_common.
    Some UT in this project failed because this change.

#### How Has This Been Tested?
    Pass all UT and sonic-buildimage E2E test.
vivekrnv pushed a commit to vivekrnv/sonic-utilities that referenced this pull request Jun 23, 2022
)

Fix UT failed cause by change sonic_py_common to use swss_common

#### Description
    Fix UT failed cause by change sonic_py_common to use swss_common, here is UT failed message:

          2022-02-28T09:26:11.4706067Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
          2022-02-28T09:26:11.4706457Z scripts/route_check.py:556: in main
          2022-02-28T09:26:11.4706805Z     ret, res= check_routes()
          2022-02-28T09:26:11.4707152Z scripts/route_check.py:491: in check_routes
          2022-02-28T09:26:11.4707567Z     rt_appl_miss = filter_out_local_interfaces(rt_appl_miss)
          2022-02-28T09:26:11.4708035Z scripts/route_check.py:352: in filter_out_local_interfaces
          2022-02-28T09:26:11.4708494Z     chassis_local_intfs = chassis.get_chassis_local_interfaces()
          2022-02-28T09:26:11.4708981Z utilities_common/chassis.py:7: in get_chassis_local_interfaces
          2022-02-28T09:26:11.4709703Z     chassisdb_conf=os.path.join('/usr/share/sonic/device/', platform, "chassisdb.conf")
          2022-02-28T09:26:11.4710280Z /usr/lib/python3.7/posixpath.py:94: in join
          2022-02-28T09:26:11.4710838Z     genericpath._check_arg_types('join', a, *p)
          2022-02-28T09:26:11.4711261Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    The UT failed because device_info.get_platform() return null, to fix this issue, add mock method for device_info.get_platform().

#### Motivation and Context
    pyswss will be deprecate, so sonic_py_common will changed to use swss_common.
    Some UT in this project failed because this change.

#### How Has This Been Tested?
    Pass all UT and sonic-buildimage E2E test.
liat-grozovik pushed a commit that referenced this pull request Jun 23, 2022
) (#2231)

Fix UT failed cause by change sonic_py_common to use swss_common

#### Description
    Fix UT failed cause by change sonic_py_common to use swss_common, here is UT failed message:

          2022-02-28T09:26:11.4706067Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
          2022-02-28T09:26:11.4706457Z scripts/route_check.py:556: in main
          2022-02-28T09:26:11.4706805Z     ret, res= check_routes()
          2022-02-28T09:26:11.4707152Z scripts/route_check.py:491: in check_routes
          2022-02-28T09:26:11.4707567Z     rt_appl_miss = filter_out_local_interfaces(rt_appl_miss)
          2022-02-28T09:26:11.4708035Z scripts/route_check.py:352: in filter_out_local_interfaces
          2022-02-28T09:26:11.4708494Z     chassis_local_intfs = chassis.get_chassis_local_interfaces()
          2022-02-28T09:26:11.4708981Z utilities_common/chassis.py:7: in get_chassis_local_interfaces
          2022-02-28T09:26:11.4709703Z     chassisdb_conf=os.path.join('/usr/share/sonic/device/', platform, "chassisdb.conf")
          2022-02-28T09:26:11.4710280Z /usr/lib/python3.7/posixpath.py:94: in join
          2022-02-28T09:26:11.4710838Z     genericpath._check_arg_types('join', a, *p)
          2022-02-28T09:26:11.4711261Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    The UT failed because device_info.get_platform() return null, to fix this issue, add mock method for device_info.get_platform().

#### Motivation and Context
    pyswss will be deprecate, so sonic_py_common will changed to use swss_common.
    Some UT in this project failed because this change.

#### How Has This Been Tested?
    Pass all UT and sonic-buildimage E2E test.

Co-authored-by: liuh-80 <58683130+liuh-80@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants