Skip to content

Instantly share code, notes, and snippets.

@yangchenyun
Created January 29, 2022 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yangchenyun/848aa3e3cba301e5d95e7ea95f05eafd to your computer and use it in GitHub Desktop.
Save yangchenyun/848aa3e3cba301e5d95e7ea95f05eafd to your computer and use it in GitHub Desktop.
Test cases
minibox_scenarios = [
"<1.2.3",
">=1.2.3 AND <1.3.8",
"==1.3.8",
]
system_patch_scenarios = [
"brand_new_box", # never applied any system patch
"used_box", # has applied some system patch, but not all
"updated_box", # has applied all system patches
]
test_targets = [
"minibox",
# NOTE: The feature is released on a model by model basis
# Current model with a release cloud be found at
# https://github.com/turingvideo/zeno-console/tree/master/static_data/services
"TR-MRP042T",
# "TR-MRP082T",
# "TR-MRP164T",
# "TR-MRP328T",
"TR-MRP04",
# "TR-MRP08",
# "TR-MRP16",
# "TR-MR32R",
# "TR-MR64R",
]
# NOTE: regression has been excluded
features = [
"reboot_before_system_OTA", # expect error
"reboot_after_system_OTA",
"software_upgrade_before_system_OTA", # expect error
"software_upgrade",
"robust:software_upgrade_surviving_unplug",
"robust:only_one_action_is_allowed",
"robust:software_upgrade_one_service_is_allowed",
]
if __name__ == "__main__":
rows = [[tt, mv, sp]
for sp in system_patch_scenarios
for mv in minibox_scenarios
for tt in test_targets
]
print('Test The following features against the scenarios below:')
print()
[print(f) for f in features]
print()
print('| Test Target | Box System Status | Minibox Status |')
for row in rows:
print('| {:>12} | {:>20} | {:>15} |'.format(*row))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment