Skip to content

Converted bgp_bounce test to pytest#2866

Merged
yxieca merged 3 commits intosonic-net:masterfrom
OleksandrKozodoi:bgp_bounce_to_pytest
Jan 28, 2021
Merged

Converted bgp_bounce test to pytest#2866
yxieca merged 3 commits intosonic-net:masterfrom
OleksandrKozodoi:bgp_bounce_to_pytest

Conversation

@OleksandrKozodoi
Copy link
Copy Markdown
Contributor

Signed-off-by: Oleksandr Kozodoi oleksandrx.kozodoi@intel.com

Description of PR

Summary:

  1. Converted bgp_bounce test to pytest
  2. Added new fixture for test setup and test teardown
  3. Added helper functions for test case
  4. Added Test Plan for bgp_bounce test case
  5. Updated bgp_no_export.j2 template
  6. Updated bgp_plain.j2 template

Type of change

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

Approach

What is the motivation for this PR?

Migrating tests from ansible to pytest framework

How did you do it?

Converted bgp_bounce ansible tests to pytest.
Old versions of ansible test:
bgp_bounce.yml

How did you verify/test it?

Run test. Test passed.
py.test bgp/test_bgp_bounce.py -rA

Any platform specific information?

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

The test will run on the following testbeds:
t1

Documentation

Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Jan 26, 2021

This pull request introduces 1 alert when merging 54169b0 into 15793fb - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'

@yxieca yxieca merged commit ae9770b into sonic-net:master Jan 28, 2021
wangxin pushed a commit that referenced this pull request Jun 7, 2022
For test introduced from #2866, test_bgp_bounce.py calls 'docker cp' cmd
from host to bgp(s), via bgp_helpers.py, which does not consider
multi-asic scenario, where we want to copy bgp config files to all BGPs.
This PR does the following change:

1. For multi-asic, copy to all BGPs, as well as restart all BGPs and make
sure all BGPs come back. For single-asic remains the same behavior.
2. Add restart_bgp() in multi_asic.py to do consideration for
multi-asic/single-asic all in this file, and leave the wait_until() in
bgp_helpers.py to let know if all BGPs are back up.
3. Original restart_bgp(asic_index) moved to restart_service_on_asic in
multi_asic.py to work on one asic.

How did you verify/test it?
./run_tests.sh-n {multi_asic testbed} -i ../ansible/xxx,../ansible/veos
-f ../ansible/testbed.csv -u -e "--skip_sanity --disable_loganalyzer" -c
bgp/test_bgp_bounce.py
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…AD (sonic-net#15532)

#### Why I did it
Update submodule sonic-utilities to the latest HEAD
```
50296b90 - [202012][dhcp-relay] Fix dhcp6relay counter issue (sonic-net#2866) (sonic-net#2873) (Fri Jun 30 18:08:53 2023 +0800) <Yaqiang Zhu>
160030c4 - [202012][dhcp_relay] Add "Reconfigure", "Information-Request", "Malformed" counter options (sonic-net#2844) (Sun Jun 11 20:35:30 2023 -0700) <kellyyeh>
e6289ced - [vlan][dhcp_relay] Clear dhcpv6 relay counter while deleting vlan (sonic-net#2852) (Fri Jun 2 18:20:21 2023 +0000) <Yaqiang Zhu>
885082ec - correctly parsing complete ipv6 vnet info (sonic-net#2827) (Thu May 25 06:01:40 2023 +0000) <Keith Lu>
```

##### Work item tracking
- Microsoft ADO 22635770
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…atically (sonic-net#15510)

src/sonic-utilities

* 43c85ef5 - (HEAD -> 202205, origin/202205) [dhcp-relay] Fix dhcp6relay counter issue (sonic-net#2866) (10 hours ago) [Yaqiang Zhu]
* e0333b5c - Revert "[config]config reload should generate sysinfo if missing (sonic-net#2778)" (sonic-net#2865) (10 hours ago) [jingwenxie]
* e7eac6bf - [config] Generate sysinfo in single asic (sonic-net#2856) (10 hours ago) [jingwenxie]
* e42291bb - [config] Generate sysinfo as needed when override config (sonic-net#2836) (10 hours ago) [jingwenxie]
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