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

[dvs] Refactor ACL tests to use polling interface to access redis #1213

Merged
merged 3 commits into from
Mar 11, 2020

Conversation

daall
Copy link
Contributor

@daall daall commented Mar 3, 2020

  • Introduce new DVSDatabase abstraction and SONiC redis fixtures
  • Refactor ACL tests to use redis fixtures

Signed-off-by: Danny Allen daall@microsoft.com

Why I did it

  • To help make the vs tests more reliable by not relying on arbitrary wait times
  • To make the vs tests faster by reducing the wait time (acl tests run in ~50% of the time now)

How I verified it

daall@rainier:~/dev/sonic-swss/tests$ sudo pytest -s -v --dvsname=vs test_acl.py
=========================================================================================== test session starts ============================================================================================
platform linux2 -- Python 2.7.17, pytest-4.6.9, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /home/daall/dev/sonic-swss/tests
plugins: flaky-3.6.1
collected 24 items                                                                                                                                                                                         

test_acl.py::TestAcl::test_AclTableCreation PASSED
test_acl.py::TestAcl::test_AclRuleL4SrcPort PASSED
test_acl.py::TestAcl::test_AclRuleInOutPorts PASSED
test_acl.py::TestAcl::test_AclRuleInPortsNonExistingInterface PASSED
test_acl.py::TestAcl::test_AclRuleOutPortsNonExistingInterface PASSED
test_acl.py::TestAcl::test_AclTableDeletion PASSED
test_acl.py::TestAcl::test_V6AclTableCreation PASSED
test_acl.py::TestAcl::test_V6AclRuleIPv6Any PASSED
test_acl.py::TestAcl::test_V6AclRuleIPv6AnyDrop PASSED
test_acl.py::TestAcl::test_V6AclRuleIpProtocol PASSED
test_acl.py::TestAcl::test_V6AclRuleSrcIPv6 PASSED
test_acl.py::TestAcl::test_V6AclRuleDstIPv6 PASSED
test_acl.py::TestAcl::test_V6AclRuleL4SrcPort PASSED
test_acl.py::TestAcl::test_V6AclRuleL4DstPort PASSED
test_acl.py::TestAcl::test_V6AclRuleTCPFlags PASSED
test_acl.py::TestAcl::test_V6AclRuleL4SrcPortRange PASSED
test_acl.py::TestAcl::test_V6AclRuleL4DstPortRange PASSED
test_acl.py::TestAcl::test_V6AclTableDeletion PASSED
test_acl.py::TestAcl::test_InsertAclRuleBetweenPriorities PASSED
test_acl.py::TestAcl::test_RulesWithDiffMaskLengths PASSED
test_acl.py::TestAcl::test_AclRuleIcmp PASSED
test_acl.py::TestAcl::test_AclRuleIcmpV6 PASSED
test_acl.py::TestAcl::test_AclRuleRedirectToNextHop PASSED
test_acl.py::TestAclRuleValidation::test_AclActionValidation PASSED

======================================================================================= 24 passed in 119.13 seconds ========================================================================================

* Introduce new DVSDatabase abstraction and SONiC redis fixtures
* Refactor ACL tests to use redis fixtures

Signed-off-by: Danny Allen <daall@microsoft.com>
tests/dvslib/dvs_database.py Outdated Show resolved Hide resolved
tests/dvslib/dvs_database.py Outdated Show resolved Hide resolved
@daall
Copy link
Contributor Author

daall commented Mar 9, 2020

retest this please

@yxieca
Copy link
Contributor

yxieca commented Mar 10, 2020

retest this please

@daall
Copy link
Contributor Author

daall commented Mar 10, 2020

retest this please

@daall daall merged commit 9799471 into sonic-net:master Mar 11, 2020
@daall daall deleted the dvs_db_interface branch March 11, 2020 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants