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

OSPF Test Cases #12647

Merged
merged 16 commits into from
Jun 10, 2024
Merged

OSPF Test Cases #12647

merged 16 commits into from
Jun 10, 2024

Conversation

asraza07
Copy link
Contributor

@asraza07 asraza07 commented Apr 29, 2024

Summary

Add test case code for OSPF functionality according to OSPF test plan

Type of change

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

Approach

Motivation for this PR

To add PyTest test case code in accordance with previously contributed OSPF test plan

How I did it

Added a new folder directory 'sonic-mgmt/tests/ospf/' containing the following files:

  • conftest.py containing setup/teardown plugins
  • test_ospf.py containing 2 test cases:
    • Test OSPF Neighborship
    • Test OSPF Dynamic Routing

Platform specific information

These test cases have been written to run on testing topologies with SONiC-type neighbors. Once the code is tested and verified, code to support Arista-type neighbors will be developed as well.

Supported testbed topologies

These test cases support the following topologies:

  • T0
  • T1

@asraza07 asraza07 requested review from wangxin and yxieca as code owners April 29, 2024 10:52
@yxieca yxieca requested a review from StormLiangMS April 29, 2024 16:21
@ridahanif96
Copy link
Contributor

ridahanif96 commented May 9, 2024

@StormLiangMS Hi, Can you please help review this test case. Target is 202405 release. Thanks in advance for help!

@asraza07
Copy link
Contributor Author

Sanity Testing for Test Case 1 - test_ospf_neighborship

I have manually performed the steps outlined in test_ospf_neighborship() on T0 which can be seen in the screenshots below. It can be seen that OSPF neighborship is successfully established and redistributed routes are available to the DUT shared from neighboring devices.
DUT OSPF Configuration
Neighbor OSPF Configuration
DUT OSPF Routes

Sanity Testing for Test Case 2 - test_ospf_dynamic_routing

I have manually performed the steps outlined in test_ospf_dynamic_routing() on T0 where after configuring OSPF neighborship, a Loopback interface was created on ARISTA01T1 and the route shared to the DUT. It can be seen in the screenshots below that the Loopback route is available to the DUT, and then link failure was simulated by removing the Loopback interface, after which the route is not seen by the DUT anymore.
Test OSPF Dynamic Routing DUT
Test OSPF Dynamic Routing Neighbor

@asraza07
Copy link
Contributor Author

asraza07 commented May 22, 2024

Hi @yxieca , all checks have passed and we have performed sanity testing as well. Kindly help review this PR, thanks in advance.

@ridahanif96
Copy link
Contributor

@yxieca Hi Ying, we have added sanity testing for this testcase. Can you please help review this PR. Thanks in advance.

@ridahanif96
Copy link
Contributor

@yxieca Hey Ying,

Can you pls, look into this PR. Target is 202045 release. All sanity test passed as expected by each testcase.

@yxieca yxieca merged commit 2c5415d into sonic-net:master Jun 10, 2024
14 checks passed
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