[vlan] Add pytest cases to verify data in app db and state db. #895
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Emma Lin [email protected]
What I did
[vlan] Add pytest cases to verify data in app db and state db.
Why I did it
How I verified it
Add test case:
Details if related
==================================================================== test session starts =====================================================================
platform linux2 -- Python 2.7.15rc1, pytest-3.3.0, py-1.8.0, pluggy-0.6.0 -- /usr/bin/python
cachedir: .cache
rootdir: /home/ubuntu/sonic-buildimage/src/sonic-swss/tests, inifile:
collected 15 items
test_vlan.py::TestVlan::test_VlanAddRemove PASSED [ 6%]
test_vlan.py::TestVlan::test_MultipleVlan PASSED [ 13%]
test_vlan.py::TestVlan::test_AddVlanWithIncorrectKeyPrefix[test_input0-0] PASSED [ 20%]
test_vlan.py::TestVlan::test_AddVlanWithIncorrectKeyPrefix[test_input1-0] PASSED [ 26%]
test_vlan.py::TestVlan::test_AddVlanWithIncorrectKeyPrefix[test_input2-0] PASSED [ 33%]
test_vlan.py::TestVlan::test_AddVlanWithIncorrectKeyPrefix[test_input3-1] PASSED [ 40%]
test_vlan.py::TestVlan::test_AddVlanWithIncorrectValueType[test_input0-0] PASSED [ 46%]
test_vlan.py::TestVlan::test_AddVlanWithIncorrectValueType[test_input1-0] PASSED [ 53%]
test_vlan.py::TestVlan::test_AddVlanWithIncorrectValueType[test_input2-0] PASSED [ 60%]
test_vlan.py::TestVlan::test_AddVlanWithIncorrectValueType[test_input3-1] PASSED [ 66%]
test_vlan.py::TestVlan::test_AddMaxVlan PASSED [ 73%]
test_vlan.py::TestVlan::test_VlanDbData PASSED [ 80%]
test_vlan.py::TestVlan::test_VlanMemberDbData[test_input0-expected0] PASSED [ 86%]
test_vlan.py::TestVlan::test_VlanMemberDbData[test_input1-expected1] PASSED [ 93%]
test_vlan.py::TestVlan::test_VlanMemberDbData[test_input2-expected2] PASSED [100%]