Expand description
A synthetic format before FORMAT and the chain from it, for tests
of migrations through a store’s own reads and writes. Rig never wrote
this format, and SHIPPED has no step from it.
use rig_memory::migration::testing;
use rig_memory::{MemoryStore, Session};
let store = MemoryStore::default();
testing::write_fixture(&store)?;
assert!(Session::read(&store).is_err());
testing::CHAIN.migrate(&store, &|_, _| Ok(()))?;
Session::read(&store)?;Constants§
- CHAIN
- The chain from
SYNTHETIC. - SYNTHETIC
- The synthetic format: as
FORMAT, with its blobs underSYNTHETIC_BLOBSin place ofBLOBS. - SYNTHETIC_
BLOBS - Where a session in
SYNTHETICkeeps its blobs. - UNINSTALLED
- The key of a saved value of a plugin that is not installed, which the fixture holds.
- UNINSTALLED_
FILE - The file of a plugin that is not installed, which the fixture holds.
Functions§
- write_
fixture - Writes a session in
SYNTHETICinto the emptystore, generated by today’s writer and turned back by the inverse of the step: two messages, one with an image; an aside and a saved value of a plugin that is not installed; the session’s listing; and a plugin’s file.