aa-storage-sqlite-buffer 0.0.1-beta.2

Local in-process SQLite event buffer that survives brief gateway/queue outages and flushes audit events on reconnect
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Durability-pragma tests: the buffer opens in WAL with `synchronous = NORMAL`.

use aa_storage_sqlite_buffer::EventBuffer;
use tempfile::tempdir;

#[test]
fn opens_in_wal_mode_with_synchronous_normal() {
    let dir = tempdir().unwrap();
    let buffer = EventBuffer::new(dir.path().join("buffer.db"), 100).unwrap();

    assert_eq!(buffer.journal_mode().unwrap().to_lowercase(), "wal");
    assert_eq!(buffer.synchronous().unwrap(), 1, "1 == synchronous NORMAL");
}