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

Initial voq chassis test cases and helpers #2826

Merged
merged 3 commits into from Feb 18, 2021
Merged

Conversation

tcusto
Copy link
Contributor

@tcusto tcusto commented Jan 16, 2021

Description of PR

Summary:
New test cases for VoQ system covering the first section of the distributed VoQ architecture test plan.

Type of change

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

Approach

What is the motivation for this PR?

Implement automated tests to cover "System Initialization" section of the Distributed VoQ Architecture test plan.

How did you do it?

There are new tests in test_voq_init.py for verifying the VoQ switch, system and local ports, router interfaces on local and system ports, and neighbors. The switch and port tests run on each linecard in a VoQ chassis system and verify the T2 configuration has made it correctly to the ASIC DB. The router interface test also verifies the Chassis App DB on the supervisor card. The neighbor tests verify that local neighbor creation is propagated from the local linecard to the Chassis App DB on the supervisor and into ASIC and APP DBs on remote linecards.

Inband ports are also tested in the port and router interface test, and there is a separate test case for inband neighbors establishment.

There is a voq_helpers.py containing verification and utility functions that will be shared with future VoQ test scripts. It contains routines for checking local and remote neighbors databases, checking kernel routes for remote neighbors, checking ARP tables, and other shared validations.

Lastly, in common/helpers/redis.py are classes for accessing the ASIC, APP, and Chassis APP DBs via the CLI. There are methods for getting keys from various tables and calling get or hget on keys. All of the redis db interactions that the tests perform are centralized here.

How did you verify/test it?

Ran the new tests against a chassis with T2 topology configured.

Any platform specific information?

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

T2

Documentation

@lgtm-com
Copy link

lgtm-com bot commented Jan 16, 2021

This pull request introduces 2 alerts when merging 9c00e1a into 4eeda9e - view on LGTM.com

new alerts:

  • 2 for Unnecessary 'else' clause in loop

@sanmalho-git
Copy link
Contributor

retest vsimage please

@yxieca
Copy link
Collaborator

yxieca commented Jan 28, 2021

@sanmalho-git can you address the LGTM warmings?

@sanmalho-git
Copy link
Contributor

@tcusto - can you address the LGTM warnings.

tests/common/helpers/redis.py Outdated Show resolved Hide resolved
tests/voq/test_voq_init.py Outdated Show resolved Hide resolved
tests/voq/voq_helpers.py Outdated Show resolved Hide resolved
@shubav
Copy link
Contributor

shubav commented Feb 11, 2021

@wangxin could we merge this PR? We have new tests for how ARP & Router Interface lifecycle events work on a VoQ chassis. We can push that once this is merged, as there's a dependency. Thanks.

@wangxin wangxin merged commit 5798bd6 into sonic-net:master Feb 18, 2021
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.

None yet

5 participants