Skip to content
Snippets Groups Projects
  1. Dec 15, 2020
    • Richard van der Hoff's avatar
      Preparatory refactoring of the SamlHandlerTestCase (#8938) · 01333681
      Richard van der Hoff authored
      * move simple_async_mock to test_utils
      
      ... so that it can be re-used
      
      * Remove references to `SamlHandler._map_saml_response_to_user` from tests
      
      This method is going away, so we can no longer use it as a test point. Instead,
      factor out a higher-level method which takes a SAML object, and verify correct
      behaviour by mocking out `AuthHandler.complete_sso_login`.
      
      * changelog
      Unverified
      01333681
  2. Dec 02, 2020
  3. Oct 30, 2020
  4. Sep 08, 2020
  5. Jul 24, 2020
  6. Apr 29, 2020
    • Richard van der Hoff's avatar
      Fix limit logic for EventsStream (#7358) · c2e1a211
      Richard van der Hoff authored
      * Factor out functions for injecting events into database
      
      I want to add some more flexibility to the tools for injecting events into the
      database, and I don't want to clutter up HomeserverTestCase with them, so let's
      factor them out to a new file.
      
      * Rework TestReplicationDataHandler
      
      This wasn't very easy to work with: the mock wrapping was largely superfluous,
      and it's useful to be able to inspect the received rows, and clear out the
      received list.
      
      * Fix AssertionErrors being thrown by EventsStream
      
      Part of the problem was that there was an off-by-one error in the assertion,
      but also the limit logic was too simple. Fix it all up and add some tests.
      Unverified
      c2e1a211
  7. Jan 29, 2019
  8. Jan 22, 2019
  9. Apr 06, 2016
  10. Mar 01, 2016
    • Mark Haines's avatar
      Add a /replication API for extracting the updates that happened on · 60a0f81c
      Mark Haines authored
      synapse
      
      This is necessary for replicating the data in synapse to be visible to a
      separate service because presence and typing notifications aren't stored
      in a database so won't be visible to another process.
      
      This API can be used to either get the raw data by requesting the tables
      themselves or to just receive notifications for updates by following the
      streams meta-stream.
      
      Returns updates for each table requested a JSON array of arrays with a
      row for each row in the table.
      
      Each table is prefixed by a header row with the: name of the table,
      current stream_id position for the table, number of rows, number of
      columns and the names of the columns.
      This is followed by the rows that have been added to the server since
      the requester last asked.
      
      The API has a timeout and is hooked up to the notifier so that a slave
      can long poll for updates.
      60a0f81c
  11. Feb 05, 2016
    • Daniel Wagner-Hall's avatar
      Error if macaroon key is missing from config · 6a9f1209
      Daniel Wagner-Hall authored
      Currently we store all access tokens in the DB, and fall back to that
      check if we can't validate the macaroon, so our fallback works here, but
      for guests, their macaroons don't get persisted, so we don't get to
      find them in the database. Each restart, we generate a new ephemeral
      key, so guests lose access after each server restart.
      
      I tried to fix up the config stuff to be less insane, but gave up, so
      instead I bolt on yet another piece of custom one-off insanity.
      
      Also, add some basic tests for config generation and loading.
      6a9f1209
  12. Jan 07, 2016
  13. Jan 06, 2015
  14. Oct 30, 2014
  15. Sep 03, 2014
  16. Aug 13, 2014
  17. Aug 12, 2014
Loading