Skip to content

Various fix for test_dip_sip#2122

Merged
wangxin merged 2 commits intosonic-net:masterfrom
wangxin:fix-dip-sip-pr
Aug 21, 2020
Merged

Various fix for test_dip_sip#2122
wangxin merged 2 commits intosonic-net:masterfrom
wangxin:fix-dip-sip-pr

Conversation

@wangxin
Copy link
Copy Markdown
Collaborator

@wangxin wangxin commented Aug 20, 2020

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

The test_dip_sip script has some minor issues need to be fixed.

How did you do it?

Changes:

  • Change topology mark from "any" to "t0" and "t1"
  • Remove unused variables
  • Check topology type rather than name
  • Fix typo in log message
  • Remove calling the Ansible setup module, use minigraph to get
    router and host IP addresses
  • Use router mac from duthost.facts['router_mac']
  • Simplify the code for getting src and dst port ids

How did you verify/test it?

sonicbld@88d79e903dc1:~/code/sonic-mgmt2/tests$ py.test --inventory ../ansible/inventory --host-pattern sonic-switch --testbed sonic-testbed --testbed_file ../ansible/testbed.csv ipfwd/test_dip_sip.py                                       
=========================================================================================================== test session starts ===========================================================================================================
platform linux2 -- Python 2.7.12, pytest-4.6.5, py-1.8.1, pluggy-0.13.1
ansible: 2.8.12
rootdir: /var/sonicbld/code/sonic-mgmt2/tests, inifile: pytest.ini
plugins: forked-1.1.3, xdist-1.28.0, ansible-2.2.2, repeat-0.8.0
collected 1 item                                                                                                                                                                                                                          

ipfwd/test_dip_sip.py .                                                                                                                                                                                                             [100%]

======================================================================================================== 1 passed in 59.37 seconds ========================================================================================================

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Changes:
* Change topology mark from "any" to "t0" and "t1"
* Remove unused variables
* Check topology type rather than name
* Fix typo in log message
* Remove calling the Ansible setup module, use minigraph to get
  router and host IP addresses
* Use router mac from duthost.facts['router_mac']
* Simplify the code for getting src and dst port ids

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
@wangxin wangxin requested review from a team and noaOrMlnx August 20, 2020 07:10
Copy link
Copy Markdown
Contributor

@noaOrMlnx noaOrMlnx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


pytestmark = [
pytest.mark.topology('any')
pytest.mark.topology('t0', "t1")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pytest.mark.topology('t0', "t1")
pytest.mark.topology("t0", "t1")

For consistency. :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, updated.

@wangxin wangxin merged commit dd43ab3 into sonic-net:master Aug 21, 2020
@wangxin wangxin deleted the fix-dip-sip-pr branch September 24, 2020 02:34
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
* 3fc6e27 Fix issues in clear_qos (sonic-net#2122)

Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
c5c105f (HEAD -> 202111, origin/202111) [PBH] Implement Edit Flows (sonic-net#2093)
7050581 [techsupport] Handle minor fixes of TS Lock and update auto-TS (sonic-net#2114)
3602f99 Fix issues in clear_qos (sonic-net#2122)
4f96d3b Fixing get port speed when oper status is down (sonic-net#2123)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants