Skip to content

Instantly share code, notes, and snippets.

@smccarney
Created November 5, 2020 19:49
Show Gist options
  • Save smccarney/2b6ea6ecbbeaf5a8b1793e2321799972 to your computer and use it in GitHub Desktop.
Save smccarney/2b6ea6ecbbeaf5a8b1793e2321799972 to your computer and use it in GitHub Desktop.
Test Plan for Presence Service

Test Plan

  • presence_service.[hc]pp
    • DBusPresenceService
      • clearCache()
        • Verify clears all cached data
      • isPresent()
        • Test where value is cached
          • Test where hardware is present
          • Test where hardware is not present
        • Test where value is not cached
          • Test where hardware is present
          • Test where hardware is not present
          • Verify value is cached after data obtained from D-Bus
        • Test where D-Bus method call fails with an exception
  • services.hpp
    • BMCServices
      • getPresenceService()
        • Verify returns a DBusPresenceService object
        • Verify DBusPresenceService object can get hardware presence
  • mock_presence_service.hpp
    • clearCache()
      • Verify call to this from test case
    • isPresent()
      • Verify call to this from test case
      • Verify gmock can return true
      • Verify gmock can return false
  • mock_services.hpp
    • getPresenceService()
      • Verify returns a PresenceService object
    • getMockPresenceService()
      • Verify returns a MockPresenceService object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment