Skip to content
  • Philip Withnall's avatar
    dummy: Add a dummy backend · 3a63de91
    Philip Withnall authored
    This is a new backend targeted at making libfolks more testable. It is
    designed to be used in internal libfolks unit tests, allowing the test
    driver code to manipulate the backing store state to test how that
    affects front-end state in libfolks. For example, it will be useful in
    more thoroughly testing the IndividualAggregator.
    
    It includes work by Renato Araujo Oliveira Filho <renatox@gmail.com>.
    
    The backend may also be useful for testing libfolks clients,
    such as contacts UIs, by providing an easy way to create well-known
    personas to appear in the the UI. Hence, it is an installed backend, and
    is loaded by default (although creates no Backend or PersonaStore instances
    unless API calls are made).
    
    It is designed to allow delay and error injection into all major
    PersonaStore operations, and to allow any kind of Persona implementation
    to be returned from the store.
    
    It includes a few small test cases to sanity-check that the backend
    works, but no thorough self-test-coverage.
    
    Full API documentation is included and installed by default. The API is
    not currently stable, so while external projects may start to consume
    it, they should be prepared for breakage in the future as the API
    stabilises. No timescale is given for such stabilisation.
    
    This commit does not include any changes to the core libfolks unit
    tests, but future changes could be made to port them to use the dummy
    backend.
    
    New API:
     • libfolks-dummy.la mocking library and all its symbols
    
    https://bugzilla.gnome.org/show_bug.cgi?id=648811
    3a63de91