Skip to content

Instantly share code, notes, and snippets.

@smccarney
Last active January 30, 2021 23:09
Show Gist options
  • Save smccarney/d3d7384700abcc5abf436e2b859d98e5 to your computer and use it in GitHub Desktop.
Save smccarney/d3d7384700abcc5abf436e2b859d98e5 to your computer and use it in GitHub Desktop.
Test Plan

Test Plan

  • DBusPresenceService::isPresent()
    • Where value is cached
      • Value is true
      • Value is false
        • Obtained false from Present property
        • Obtained false by catching expected exception
    • Where value is not cached
      • No exception occurs
        • Value is true
        • Value is false
        • Verify value is cached
      • Exception occurs
        • Expected exception
          • Verify present set to false and cached
        • Unexpected exception
          • Verify exception re-thrown
          • Verify no value is cached
  • DBusPresenceService::isExpectedException()
    • Test where D-Bus name is NULL
      • Verify returns false
    • Test where D-Bus name is not NULL
      • Test where name is expected
        • SD_BUS_ERROR_UNKNOWN_OBJECT
          • Verify returns true
        • SD_BUS_ERROR_UNKNOWN_INTERFACE
          • Verify returns true
            • Was not able to cause. When an invalid interface name was specified (like "xyz.openbmc_project.Inventory.Itemz") it returned SD_BUS_ERROR_UNKNOWN_PROPERTY.
        • SD_BUS_ERROR_UNKNOWN_PROPERTY
          • Verify returns true
      • Test where name is not expected
        • Verify returns false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment