Skip to content
Snippets Groups Projects
  • David Robertson's avatar
    d3cf0730
    Optionally use an on-disk sqlite db in tests (#11702) · d3cf0730
    David Robertson authored
    
    * Optionally use an on-disk sqlite db in tests
    
    When debugging a test it is sometimes useful to inspect the state of the
    DB. This is not easy when the db is in-memory: one cannot attach the
    sqlite CLI to another process's DB.
    
    With this change, if SYNAPSE_TEST_PERSIST_SQLITE_DB is set, we use
     `_trial_temp/test.db` as our sqlite database. One can then use 
    `sqlite3 _trial_temp/test.db` and query to your heart's content.
    
    The DB is destroyed and recreated between different test cases.
    
    Co-authored-by: default avatarPatrick Cloke <clokep@users.noreply.github.com>
    d3cf0730
    History
    Optionally use an on-disk sqlite db in tests (#11702)
    David Robertson authored
    
    * Optionally use an on-disk sqlite db in tests
    
    When debugging a test it is sometimes useful to inspect the state of the
    DB. This is not easy when the db is in-memory: one cannot attach the
    sqlite CLI to another process's DB.
    
    With this change, if SYNAPSE_TEST_PERSIST_SQLITE_DB is set, we use
     `_trial_temp/test.db` as our sqlite database. One can then use 
    `sqlite3 _trial_temp/test.db` and query to your heart's content.
    
    The DB is destroyed and recreated between different test cases.
    
    Co-authored-by: default avatarPatrick Cloke <clokep@users.noreply.github.com>