Skip to content

Commit

Permalink
Merge pull request sonic-net#2 from tombo315/master
Browse files Browse the repository at this point in the history
adding test suite
  • Loading branch information
Tom Booth authored Oct 19, 2016
2 parents b005f02 + eb73914 commit 2e7fe1b
Show file tree
Hide file tree
Showing 11 changed files with 3,687 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ var/
*.egg-info/
.installed.cfg
*.egg
tests/

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down Expand Up @@ -138,3 +137,4 @@ fabric.properties

src/sonic_ax_impl/mibs/vendor/
gh-release.patch
tests/test_cpuUtilizationHandler.py
Empty file added tests/__init__.py
Empty file.
332 changes: 332 additions & 0 deletions tests/mock_tables/appl_db.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,332 @@
{
"LLDP_ENTRY_TABLE:Ethernet100": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18544,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet26"
},
"LLDP_ENTRY_TABLE:Ethernet4": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18543,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet2"
},
"LLDP_ENTRY_TABLE:Ethernet104": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18544,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet27"
},
"LLDP_ENTRY_TABLE:Ethernet0": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18545,
"lldp_rem_port_desc": "this is a port description",
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet1"
},
"LLDP_ENTRY_TABLE:Ethernet108": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18544,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet28"
},
"LLDP_ENTRY_TABLE:Ethernet8": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18543,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet3"
},
"LLDP_ENTRY_TABLE:Ethernet96": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18543,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet25"
},
"LLDP_ENTRY_TABLE:Ethernet92": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 32,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet24"
},
"LLDP_ENTRY_TABLE:Ethernet124": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 4834,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet32"
},
"LLDP_ENTRY_TABLE:Ethernet120": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 3844,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet31"
},
"LLDP_ENTRY_TABLE:Ethernet40": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 572,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet11"
},
"LLDP_ENTRY_TABLE:Ethernet44": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 1202,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet12"
},
"LLDP_ENTRY_TABLE:Ethernet48": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 1202,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet13"
},
"LLDP_ENTRY_TABLE:Ethernet24": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 1775,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet7"
},
"LLDP_ENTRY_TABLE:Ethernet68": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18543,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet18"
},
"LLDP_ENTRY_TABLE:eth0": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "f4:b5:2f:56:34:00",
"lldp_rem_sys_desc": "I'm going to need you to come in on saturday",
"lldp_rem_time_mark": 18542,
"lldp_rem_port_desc": "TPS report vending machine",
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch218ad08",
"lldp_rem_port_id": "ge-0/0/17"
},
"LLDP_ENTRY_TABLE:Ethernet20": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18545,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet6"
},
"LLDP_ENTRY_TABLE:Ethernet60": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18543,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet16"
},
"LLDP_ENTRY_TABLE:Ethernet64": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18543,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet17"
},
"LLDP_ENTRY_TABLE:Ethernet112": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 2103,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet29"
},
"LLDP_ENTRY_TABLE:Ethernet116": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 1113,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet30"
},
"LLDP_ENTRY_TABLE:Ethernet84": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 362,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet22"
},
"LLDP_ENTRY_TABLE:Ethernet80": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 362,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet21"
},
"LLDP_ENTRY_TABLE:Ethernet88": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 92,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet23"
},
"LLDP_ENTRY_TABLE:Ethernet52": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18543,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet14"
},
"LLDP_ENTRY_TABLE:Ethernet76": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18543,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet20"
},
"LLDP_ENTRY_TABLE:Ethernet56": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18543,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet15"
},
"LLDP_ENTRY_TABLE:Ethernet72": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18543,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet19"
},
"LLDP_ENTRY_TABLE:Ethernet32": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 1142,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet9"
},
"LLDP_ENTRY_TABLE:Ethernet28": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18513,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet8"
},
"LLDP_ENTRY_TABLE:Ethernet36": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 152,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet10"
},
"LLDP_ENTRY_TABLE:Ethernet16": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18545,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet5"
},
"LLDP_ENTRY_TABLE:Ethernet12": {
"lldp_rem_port_id_subtype": 5,
"lldp_rem_chassis_id": "00:11:22:33:44:55",
"lldp_rem_sys_desc": "I'm a little teapot.",
"lldp_rem_time_mark": 18545,
"lldp_rem_port_desc": null,
"lldp_rem_chassis_id_subtype": 4,
"lldp_rem_sys_name": "switch13",
"lldp_rem_port_id": "Ethernet4"
}
}
Loading

0 comments on commit 2e7fe1b

Please sign in to comment.