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

test bgp facts - skip for supervisor card in a SONiC chassis #2509

Merged
merged 3 commits into from
Nov 17, 2020

Conversation

sanmalho-git
Copy link
Contributor

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?

In a SONiC chassis, we have 'supervisor' cards (control cards) that are not running 'bgp' dockers.

If we use the multi-DUT approach, we are including the 'supervisor' card as well in the list of DUTs. Thus, test_bgp_facts gets run on 'supervisor' card as well.

We need to skip the test when duthost is a 'supervisor' card.

How did you do it?

A card is identified as a 'supervisor' card, if it has a 'type' field in its host vars in the ansible inventory that is set to 'supervisor'.
We use this check to figure out if the test is to be skipped.

How did you verify/test it?

Ran test_bgp_facts against a SONiC chassis with two linecards (board1, board2) and a supervisor card (supervisor1). Results summary below:

============================================================================== short test summary info ==============================================================================
PASSED ../tests/bgp/test_bgp_fact.py::test_bgp_facts[board1-None]
PASSED ../tests/bgp/test_bgp_fact.py::test_bgp_facts[board2-None]
SKIPPED [1] /data/tests/bgp/test_bgp_fact.py:17: bgp_facts not valid on supervisor card 'supervisor1'
=================================================================== 2 passed, 1 skipped in 83.83 seconds ===================================================================

Any platform specific information?

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

Documentation

- check if duthost is a 'supervisor' card based on the 'type' defined in host vars in the inventory.
  - if 'type' is defined and is 'supervisor', then skip the test
…ts and using is_supervisor_node in test_bgp_facts.

This is per review comment
@wangxin wangxin merged commit 2ad4f4d into sonic-net:master Nov 17, 2020
@sanmalho-git sanmalho-git deleted the test_bgp_facts branch November 17, 2020 23:14
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.

2 participants